切换到宽版
  • 2247Read
  • 0Replay

SSH 密锁登录---公共服务器上慎用 [复制链接]

上一主题 下一主题
离线Francis
 

只看楼主 倒序阅读 使用道具 楼主  posttime: 2016-04-23
1. 生成密锁
ssh-keygen
...(一直按Enter,最后在~/.ssh/下生成密钥)

2.密锁复制到远程主机
ssh-copy-id user@xxx.xxx.xxx.xxx

3.对于非22端口的密锁复制
ssh-copy-id '-p xxx  user@xxx.xxx.xxx.xxx'


切换到root账号和目录执行上述命令,在root下也可以免密码登录了




快速回复
限100 字节
批量上传需要先选择文件,再选择上传
 
上一个 下一个