博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux 免密码登录
阅读量:4604 次
发布时间:2019-06-09

本文共 1315 字,大约阅读时间需要 4 分钟。

linux 免密码登录 配置

test 为本地linux

 192.168.1.70 为远程linux

[root@test:/home/root]$ssh-keygen

Generating public/private rsa key pair.
Enter file in which to save the key (/home/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/root/.ssh/id_rsa.
Your public key has been saved in /home/root/.ssh/id_rsa.pub.
The key fingerprint is:
44:xx:30:xx:xx:76:4b:3a:82:fc:xx:0b:bf:xx:xx:fb root@test
The key's randomart image is:
+--[ RSA 2048]----+
| +.. |
| + = |
| o + = |
| . . o * . |
| o . = S |
| . o.+ . |
| . +o |
| . +. |
| oE. |
+-----------------+
[root@test:/home/root]$ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.1.70
The authenticity of host '192.168.1.70 (192.168.1.70)' can't be established.
RSA key fingerprint is 36:1f:9f:42:fe:7c:bd:34:5b:b0:06:3a:a2:52:b8:ba.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.70' (RSA) to the list of known hosts.
root@192.168.1.70's password:
Permission denied, please try again.
root@192.168.1.70's password:
Now try logging into the machine, with "ssh '192.168.1.70'", and check in:

.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

[root@test:/home/root]$

转载于:https://www.cnblogs.com/testway/p/7723187.html

你可能感兴趣的文章
pom.xml里有红叉报错的解决办法
查看>>
Perl last和next的用法区别
查看>>
Selenium 管理 Cookies
查看>>
exceptionfunction[LeetCode]Permutations
查看>>
Linux(2)_常用命令2
查看>>
自定义分页
查看>>
[转]DELPHI——调试(1)
查看>>
JS秒数转成分秒时间格式
查看>>
xp_cmdshell 命令的开启与关闭,和状态查询
查看>>
Linux sudoers
查看>>
MySQL详解(18)-----------分页方法总结
查看>>
bzoj 4595 激光发生器
查看>>
multi cookie & read bug
查看>>
js时间转换
查看>>
(转载) Android Studio你不知道的调试技巧
查看>>
POJ2231 Moo Volume 递推 C语言
查看>>
struts2类型转换的具体流程
查看>>
Hdu 1203 I NEED A OFFER!
查看>>
php文件上传类
查看>>
CF219D Choosing Capital for Treeland
查看>>