#Trying to SSH into a ubuntu server

9 messages · Page 1 of 1 (latest)

vast whale
#
PS C:\Users\Admin> ssh administrator@192.168.0.10
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 ED25519 key sent by the remote host is
KJASDF;KJASD;FJASD;JFAS;DJFK;ASDKJFA;SDJKF;ALSDJKF;LASDJFL;ASKJDFA;SLKJ.
Please contact your system administrator.
Add correct host key in C:\\Users\\Admin/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:\\Users\\Admin/.ssh/known_hosts:9
Host key for 192.168.0.10 has changed and you have requested strict checking.
Host key verification failed.

This is the error message that i get (MINUS THE IP AND THE KEY SENT BY THE REMOTE HOST. Don't know if it even matters but didn't want to just put that out there first haha.) Anyway, when I try to ssh into my server via ssh administrator@192.168.0.10 it gives me the above error message. I recently removed the distro/operating system on my server and reinstalled it to a different version. I assume that's messed it up. I've followed a few videos online, but i can't use the commands they did and nothing was wrokign. Last ditch effort, thank you so much!

bright violet
#

This is because new SSH keys were generated on your server after its OS was reinstalled.

In notepad on this computer, open C:\Users\Admin\.ssh\known_hosts and remove the 9th line and any others that show the IP 192.168.0.10 or the server's hostname (if you don't know what that is, don't worry about it). Then try SSHing again and type yes when asked to accept the SSH fingerprint.

One of the cases the error mentions is exactly what happened:

It is also possible that a host key has just been changed.
...you just didn't realize :P

vast whale
bright violet
#

Sure, you should just be able to do notepad C:\Users\Admin\.ssh\known_hosts

Note that known_hosts is actually just a text file! It just doesn't have the typical .txt extension.

If you can't find it (or if notepad says it doesn't exist), you can also try checking C:\ProgramData\ssh\known_hosts (I think I got that path right, going from memory here). Note that ProgramData is a hidden folder so you'll have to either navigate there with Command Prompt or PowerShell, or show hidden folders in File Explorer.

bright violet
#

I did get that path right, but fwiw the known_hosts file is stored at C:\Users\floatingmilkshake\.ssh\ on my system. You probably won't see it under the ProgramData path.

vast whale
bright violet
#

No worries. You can open Command Prompt or PowerShell and just run notepad C:\Users\Admin\.ssh\known_hosts to open the file in notepad directly, or if you open File Explorer you can click the space up top that shows what folder you're in (or press ctrl+L) and type C:\Users\Admin\.ssh to open the folder. There should be a known_hosts file in there judging by the warning in your post.

vast whale
vast whale