I actually reset the MDT keys on my Coral Dev board but not it doesn't let me access the board - google-coral

I get the following error when I use "mdt shell".
I have went through the documentation and all I want to know how I can access the board files? As the documentation tells me to remove the authorized keys from /home/mendel/.ssh/authorized-keys directory.
I have connected the serial port but I don't see anything when I try to Dmesg| grep but i get a sound like a device is connected to the PC. How can I access the coral files in order to delete the authorized files?
I'm using UBUNTU terminal on Windows.
'''
~$ mdt shell green-horse
Waiting for device green-horse...
Connecting to green-horse at 192.168.101.2
Key not present on green-horse -- pushing
Couldn't connect to keymaster on green-horse: [Errno 111] Connection refused.
Did you previously connect from a different machine? If so,
mdt-keymaster will not be running as it only accepts a single key.
You will need to either:
Remove the key from /home/mendel/.ssh/authorized_keys on the
device via the serial console
or -
Copy the mdt private key from your home directory on this host
in ~/.config/mdt/keys/mdt.key to the first machine and use
'mdt pushkey mdt.key' to add that key to the device's
authorized_keys file.
Failed to push via keymaster -- will attempt password login as a fallback.
Can't login using default credentials: Bad authentication type; allowed types: ['publickey']
'''

Did you insert the SD card on the first attempt to connect using mdt?
If so, remove it and try again.

Related

warning REMOTE HOST IDENTIFICATION HAS CHANGED

Yesterday I was trying to update my ruby on rails application by uploading it with capistrano but I had to cancel the upload in the middle of the process, immediately I was trying to access the server via ssh with ssh deploy#my_ip_server and it was waiting to access, I ended up restarting the aws instance.
Today I am trying to access the server via ssh and I get this alert:
###########################################################
# WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! #
###########################################################
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:Adfadssdgdfg......
Please contact your system administrator.
Add correct host key in /home/jeff/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/jeff/.ssh/known_hosts:23
remove with:
ssh-keygen -f "/home/jeff/.ssh/known_hosts" -R "my_ip_server"
ECDSA host key for my_ip_server has changed and you have requested strict checking.
The ip of my instance changed I imagine it is because I restarted the instance, I immediately changed the .ssh/authorized_keys file with a new access key.
To access by ssh I have a security rule in aws that only allows access with the ip of my machine.
Should I be worried about this alert? being that the instance is new and at the moment it is only in testing phase.

Jenkins cannot connect to EC2 using private key, but I can connect using Putty

I recently inherited a Jenkins instance running on an AWS EC2 server. It has several pipelines to different EC2 servers that are running successfully. I'm having trouble adding a new node to a new EC2 web server.
I have an account on that new web server named jenkins. I generated keys, added the ssh-rsa key to ~/.ssh/authorized_keys, and verified I was able to connect with the jenkins user via Putty.
In Jenkins, under Dashboard > Credentials > System > Global Credentials, I created new credentials as follows:
Username: jenkins
Private Key -> Enter Key Directly: Pasted in the key beginning with "BEGIN RSA PRIVATE KEY":
Finally, I created a new node using those credentials, to connect via SSH and use the "Known hosts file Verification Strategy."
Unfortunately, I'm getting the following error when I attempt to launch the agent:
[01/04/22 22:16:43] [SSH] WARNING: No entry currently exists in the
Known Hosts file for this host. Connections will be denied until this
new host and its associated key is added to the Known Hosts file. Key
exchange was not finished, connection is closed.
I verified I have the correct Host name configured in my node.
I don't know what I'm missing here, especially since I can connect via Putty.
Suggestions?
Have you added the new node to the known hosts file on the Controller node?
I assume Putty was your local machine rather than the controller?
See this support article for details
https://support.cloudbees.com/hc/en-us/articles/115000073552-Host-Key-Verification-for-SSH-Agents#knowhostsfileverificationstrategy
Sounds like your system doesn't allow for automatic hostkeys into the known_hosts file. You can check for the UpdateHostKeys flag in either your user, system, or potentially whatever user Jenkins runs under, SSH Config file. You can read more about the specific flag I'm talking about here.
If you need to add that hostkey manually, here's a nice write up for how to do it.

Setup new connection in mysql workbench using standard TCP IP over SSH

Could not read the contents of .ssh directory.
Error opening directory '/home/[username]/.ssh': Permission denied
I can see in the list of running processes that mysql-workbench is not running as root user.
I am not sure what the actual issue is. I only want to load '/home/[username]/.ssh/id_rsa' file while adding parameter in 'SSH key file' during connection setup. So that my connection should be established successfully.
Presumably you're on Ubuntu. I had this problem too and https://askubuntu.com/a/1271919/48214 was the solution for me.

Is there any way I can fix this problem with my coral dev board?

I was using coral board with my login credentials before but the SSH didn't seem to work so I removed the keys from the coral in order to generate new ones and now its not letting me in the board. I'm a noob at this, if you answer this please be specific. its for my college project. How do i change the accesskeys in the directory?
Waiting for a device...
Connecting to green-horse at 192.168.101.2
Key not present on green-horse -- pushing
Couldn't connect to keymaster on green-horse: [Errno 111] Connection refused.
Did you previously connect from a different machine? If so,
mdt-keymaster will not be running as it only accepts a single key.
You will need to either:
1) Remove the key from /home/mendel/.ssh/authorized_keys on the
device via the serial console
- or -
2) Copy the mdt private key from your home directory on this host
in ~/.config/mdt/keys/mdt.key to the first machine and use
'mdt pushkey mdt.key' to add that key to the device's
authorized_keys file.
Failed to push via keymaster -- will attempt password login as a fallback.
Can't login using default credentials: Bad authentication type; allowed types: ['publickey']
ssh should also works (it is what I use), but you'll need generate a key on your host machine and then put it in the ~/.ssh/authorized_keys on the board, there could be multiple keys placed in that file, and mdt needs to be one of them.
To recovers mdt access, you can check here: https://coral.ai/docs/dev-board/mdt/#recover-mdt-access
To ssh into the board, generate your own ssh key:
ssh-keygen
and your new key will be in ~/.ssh/id_rsa.pub, you can put that key on the board in order to ssh.

Connect spyder to a remote kernel via ssh tunnel

I am trying to connect spyder, running on local_machine (macOS), to a remote kernel running on compute_server (a compute node of a cluster). The compute node is not directly accessible via the internet, I can only access the cluster via login_server.
I try the following:
On compute_server I do:
python -m spyder_kernels.console
To connect another client to this kernel, use:
--existing kernel-20351.json
I copy this json file to the appropriate place on local_machine. It contains the text:
"shell_port": 46540,
"iopub_port": 39268,
"stdin_port": 40704,
"control_port": 42637,
"hb_port": 46887,
I create an ssh tunnel through login_server. On local_machine I do:
ssh -L46540:compute_server:46540 -L39268:compute_server:39268 -L40704:compute_server:40704 -L42637:compute_server:42637 -L46887:compute_server:46887 me#login_server
I start spyder on local_machine, ask it to connect to an existing kernel, enter the name of the json file, check the 'This is a remote kernel' box, enter me#login_server for Host name. I have ssh keys set up for login to login_server already.
The connection hangs. If I start the spyder kernel on login_server and omit Step 2 then it works fine, but I can't do heavy computation on login_server, I do have to work on compute_server.
Any ideas?
I believe it should work if you connect Spyder to your localhost. So at the 'This is a remote kernel' box, enter localhost for the Host name. And enter the relevant port(!).
(And add your username and password for compute_server.)

Resources