SSH免密码登录
2015-12-26 16:59
281 查看
1. 在我自己的PC机上生成 output_keyfile, output_keyfile.pub:
cc@PC:~/.ssh$ ssh-keygen -t rsa -P ''
Generating public/private rsa key pair.
Enter file in which to save the key (/home/cc/.ssh/id_rsa): ali (名字随便起)
Your identification has been saved in ali.
Your public key has been saved in ali.pub.
The key fingerprint is:
a9:36:a3:17:5c:ef:4b:0e:45:05:24:a5:9e:3c:69:0d cc@PC
The key's randomart image is:
+--[ RSA 2048]----+
| . |
|
2. 上传到我购买的 服务器里:
scp ali.pub root@192.168.1.1:/home/root/.ssh/
3. 此时正常通过口令登录到我购买的服务器里, 将ali.pub追加到.ssh/authorized_keys文件里
4. log out from server。Enjoy on my PC。
cc@PC:~/.ssh$ ssh-keygen -t rsa -P ''
Generating public/private rsa key pair.
Enter file in which to save the key (/home/cc/.ssh/id_rsa): ali (名字随便起)
Your identification has been saved in ali.
Your public key has been saved in ali.pub.
The key fingerprint is:
a9:36:a3:17:5c:ef:4b:0e:45:05:24:a5:9e:3c:69:0d cc@PC
The key's randomart image is:
+--[ RSA 2048]----+
| . |
|
2. 上传到我购买的 服务器里:
scp ali.pub root@192.168.1.1:/home/root/.ssh/
3. 此时正常通过口令登录到我购买的服务器里, 将ali.pub追加到.ssh/authorized_keys文件里
4. log out from server。Enjoy on my PC。
相关文章推荐
- 找素数
- 读书笔记之-node入门
- AndroidStudio遇到的问题
- Educational Codeforces Round 4 C. Replace To Make Regular Bracket Sequence
- 使用Spring MVC统一异常处理实战
- cocos2dx 集成google 插屏广告 出现的bug
- Android 反编译
- LeetCode - N-Queens II
- Android开发中setLatestEventInfo、Handler、SimpleDateFormat警告解决办法
- eclipse工程和jdk、jre的关系
- Weka聚类算法的两个实现算法
- CSS3中的 calc()方法
- 重叠IO overlapped I/O 运用详解
- 【AngularJS学习笔记】封装一些简单的控件(封装成Html标签)
- RedisClient For .Net
- 数学函数,字符串函数,聚合函数
- poj1164The Castle(搜索)
- 【已解决】(魅族)手机usb调试模式连接不上电脑
- toString 和String.valueOf
- TCP长连接与短连接的区别