Configure SSH password-free secure login under Mac

Source: Internet
Author: User
Tags ssh server

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.