Win under personal often use SECURECRT, Mac feel securecrt not good, commonly used iterm2+zsh collocation. A connection b no password login, then a above execution Ssh-keygen all the way back, the ~/.ssh/id_rsa.pub content copy to B ~/.ssh/authorized_keys inside can
# # # Local Machine Create public key
Ssh-keygen-t rsa-c ' Your [email protected] '
# # # Copy public key to SSH server
Use the Ssh-copy-id-for-osx tool to copy the public key to the SSH server
Brew Install Ssh-copy-id
Ssh-copy-id [email protected]
# # Shortcut Login
SSH [email protected]
Or use zsh, add an alias directly to Zsh
echo "Alias ssh-to-nickname= ' ssh [email protected] '" >> ~/.ZSHRC
SOURCE ~/.ZSHRC
#使用别名即可登录到服务器
Ssh-to-nickname
REMOTE HOST identification has CHANGED problem
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ warning:remote HOST Identification has changed! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT is POSSIBLE this SOMEONE is DOING SOMETHING nasty!
Someone could is eavesdropping on your right now (Man-in-the-middle attack)!
It is also possible, the RSA host key has just been changed.
This problem occurs because the first time you use an SSH connection, an authentication is generated, stored in the client's known_hosts, because I reinstalled the server.
#指令查看:
Ssh-keygen-l-F ~/.ssh/known_hosts
Of course, you can also directly edit the known_hosts file, the contents of the relevant content can be deleted.
REFER:
1190000000481249
Configure SSH password-free secure login under Mac