I have a problem with ssh connection to my remote server. I've just reinstalled remote server recently.
user:~/workspace/cheops-master/frontend $ ssh -o PreferredAuthentications=password root@##.###.##.###
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
##:##:##:##:##:##:##:##:##:##:##:##:##:db:20:1a.
Please contact your system administrator.
Add correct host key in /home/ubuntu/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/ubuntu/.ssh/known_hosts:17
remove with: ssh-keygen -f "/home/ubuntu/.ssh/known_hosts" -R ##.###.##.###
ECDSA host key for ##.###.##.### has changed and you have requested strict checking.
Host key verification failed.
This approach doesn't work and it really drives my nuts.
How to connect via ssh with just a password? How to reset any configs for previous server?
P.S. If configs somehow were saved from previous server, I have no idea how it happened because there was no key for previous server and no special configs, just password was used, and yes, there is no need to use the key in my case.
Any advice will be appreciated, thanks!
ssh-keygen -R
.ssh
will check the host's key no matter whether you authenticate with a password or with a public key. Disabling host checking permanently as in the linked answers is not a good idea -- you can always have analias ssh0='ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
oralias ssh1='ssh -o CheckHostIP=no
if you really need to. – Jun 28 '19 at 15:16