pokerLife / wiki

开发手册、心得体会、常用网址、学习教程、常见问题梳理,持续更新中
https://pokerlife.github.io/wiki/
13 stars 7 forks source link

linux免密远程登录 #89

Open pokerLife opened 4 years ago

pokerLife commented 4 years ago

粘贴以下内容到git bash

$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

执行以下命令将公钥拷贝到服务器上:

$ ssh-copy-id username@192.168.0.1
# 服务器ip和用户名

接下来使用如下命令就可以快速访问服务器了:

ssh 'username@192.168.0.1'