江洲

自律且自由


  • 首页

  • 分类

  • 关于

  • 归档

  • 标签

  • 搜索

ssh密钥登录

发表于 2017-07-04 | 分类于 tech

使用ssh-keygen创建公钥和密钥

1
2
#按指令操作
ssh-keygen -t rsa

使用ssh-copy-id把公钥复制到远程主机上

1
2
#替换公钥名称以及远程服务器地址
ssh-copy-id -i ~/.ssh/id_rsa.pub root@xxx.xxx.xxx.xxx

最后就可以登录了

1
ssh root@xxx.xxx.xxx.xxx
QiGangzhou

QiGangzhou

1 日志
1 分类
2 标签
RSS
© 2017 QiGangzhou
由 Hexo 强力驱动
主题 - NexT.Muse