linux/macos/windows 免密登陆SSH

免密登陆SSH

服务器:linux
客户端:linux/macos/windows

Linux/Macos

ssh-keygen -t rsa
ssh-copy-id [your remote user name here]@[you remote server ip here] 

eg:

ssh-copy-id [email protected]

Windows

ssh-keygen -t rsa
scp -r [id_rsa.pub path generate in the first step] [you remote user name here]@[your remote server ip here]:~/.ssh/authorized_keys

eg:

scp -r C:\Users\zhangsan/.ssh/id_rsa.pub [email protected]:~/.ssh/authorized_keys

你可能感兴趣的:(环境配置笔记)