Score:0

Host Identification has changed for no obvious reason

in flag

This is the error I'm getting when I tried login in to my server

 ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:nLdtZYZ3MPLkpSPFJWFEO0bn8/mlG3Oe0NtEYdKbcNU.
Please contact your system administrator.
Add correct host key in /home/abayomi/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/abayomi/.ssh/known_hosts:3
  remove with:
  ssh-keygen -f "/home/abayomi/.ssh/known_hosts" -R "143.110.229.222"
ECDSA host key for 143.110.229.222 has changed and you have requested strict checking.
Host key verification failed.

OK I just successfully removed the previous hostname, I then tried to do this ssh 143.198.104.166 I'm now getting this error [email protected]: Permission denied (publickey). my user no longer has access to login to the server.

CrazyTux avatar
us flag
Just copy and execute this line `ssh-keygen -f "/home/abayomi/.ssh/known_hosts" -R "143.110.229.222"` that should solve the problem, forthemore it is recommended to remove private details such as username and ip.
Abayomi Usman avatar
in flag
how then would i add my new host name
CrazyTux avatar
us flag
The command should solve the problem, exexute the command frome your pc terminal and reconnect with the normal `ssh` command, the reconnetion via `ssh` will re-add your hostname to the server.
Abayomi Usman avatar
in flag
please check my updated question i was getting an error
Abayomi Usman avatar
in flag
I can login as root but I can't login with my user
Abayomi Usman avatar
in flag
how can I give my user access to login again?
CrazyTux avatar
us flag
Note that you are trying to connect different ip, you fixed the hostname issue for 143.110 and the permission error is for 143.198, the error means that you do not have keys to 143.198 server.
Abayomi Usman avatar
in flag
so I'm in the sever as root how can I give my user access again
Abayomi Usman avatar
in flag
Please i don't want to create another user
Score:1
us flag
  1. ssh Secure Shell - is a program for logging into a remote machine and for executing commands on a remote machine.
  2. To connect remote server you have to install "ssh server" Secure Shell Daemon - sshd.
  3. sshd usually listen to port 22 and you can connect the ssh server by using the command ssh username@hostname
  4. You can change your ssh server configuration by editing the configuration file /etc/ssh/sshd_config
  5. To your specific question:
    • The known_hosts problem may cause because you're using the same remote computer address as before but the remote computer is responding with a different fingerprint.
    • Therefore as i commented the command ssh-keygen -f "/home/abayomi/.ssh/known_hosts" -R "143.110.229.222" will solve the warning message problem.
    • The "permission deniend" error caused because you do not have keys to the specific server.
    • To add more keys to ssh server you have to add your public key to the authorized_keys file which located on /home/username/.ssh/authorized_keys or in the root user /root/.ssh/authorized_keys.
    • To generate new keys you can use the ssh-keygen command.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.