ssh remote host identification has changed

前端 未结 29 2052
故里飘歌
故里飘歌 2020-12-02 03:02

I\'ve reinstalled my server and I am getting these messages:

[user@hostname ~]$ ssh root@pong
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@           


        
29条回答
  •  时光取名叫无心
    2020-12-02 04:03

    If you are trying to connect to running docker container on port 2222 with the command and you get the error

    mian@tdowrick2~$ ssh pos@localhost -p 2222
    

    Then to solve this problem, on your local computer (i.e. host machine not container) go to cd ~/.ssh/ and open known_hosts file with text editor. Remove the line starting with [localhost]:2222 and save the file. Now try to ssh again

    mian@tdowrick2~$ ssh pos@localhost -p 2222
    

    Error will disappear but you have to do it each time the container restart.

提交回复
热议问题