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]$

linux 免密码登录的更多相关文章

  1. Linux免密码登录设置

    Linux免密码登录设置 假设要登录的机器为192.168.1.100,当前登录的机器为192.168.1.101. 首先在101的机器上生成密钥(如果已经生成可以跳过): $ ssh-keygen ...

  2. Linux免密码登录设置 && 设置快捷键

    看到这篇文章,你肯定是有这种需求. 假设要登录的机器为192.168.1.100,当前登录的机器为192.168.1.101. 首先在101的机器上生成密钥(如果已经生成可以跳过): $ ssh-ke ...

  3. linux免密码登录

    ssh-copy-id 命令 可以把本地主机的公钥复制到远程主机的authorized_keys文件上,ssh-copy-id命令也会给远程主机的用户主目录(home)和~/.ssh, 和~/.ssh ...

  4. Xshell生成密钥key(用于Linux 免密码登录)

  5. Linux使用ssh公钥实现免密码登录Linux

    ssh 无密码登录要使用公钥与私钥.linux下可以用用ssh-keygen生成公钥/私钥对,下面我以CentOS为例.有机器A(192.168.1.155),B(192.168.1.181).现想A ...

  6. Linux下SSH免密码登录

    转自:http://haitao.iteye.com/blog/1744272 ssh配置 主机A:10.0.5.199 主机B:10.0.5.198 需要配置主机A无密码登录主机A,主机B 先确保所 ...

  7. Linux 配置ssh 免密码登录

    在平常应用中,我们经常会登录到其他主机,比如说服务器,每次都需要用户名和密码. 我们可以通过ssh免密码登录服务器而不需要输入密码. 现在有一台ubuntu的阿里云服务器,称之为 server.  公 ...

  8. Mac ssh 免密码登录 Mac 或者 Linux

    最近在 Mac上操作另一台 Mac 和 Linux 服务器,每次输密码太麻烦.所以直接设置 ssh 免密码登录,省去输入密码的过程.先在本机执行 ls ~/.ssh 若不存在 id_rsa,id_rs ...

  9. linux操作系统-两台linux服务器SSH免密码登录

    A为本地主机(即用于控制其他主机的机器) ; B为远程主机(即被控制的机器Server), ip为192.168.100.247 ; A和B的系统都是Linux   在A上的命令 # ssh-keyg ...

随机推荐

  1. Python使用SSL方式发送QQ邮箱

    #coding:utf-8 import smtplib from email.mime.text import MIMEText from email.header import Header # ...

  2. python 获取当前执行的命令 处于什么文件内

    https://stackoverflow.com/questions/3718657/how-to-properly-determine-current-script-directory-in-py ...

  3. css改变hr颜色

    html中用css改变颜色,<hr style="border:0;height:1px;">如果不加border:0;的话,虽然颜色改变了,但是会显示一条黑色的边框. ...

  4. SSM实战——秒杀系统之Web层Restful url设计、SpringMVC整合、页面设计

    一:Spring整合SpringMVC 1:编写web.xml,配置DispatcherServlet <web-app xmlns="http://java.sun.com/xml/ ...

  5. Flash: Event.PASTE Flash获取剪贴板内容 触发paste事件 how to get paste event

    actionscript把文字存放到剪贴板这个就非常简单了,一般网站做点击复制基本都是这么做的. 但是,基本没有人做flash粘贴内容.今天本来想尝试一下,通过flash实现网页编辑器粘贴图片,但貌似 ...

  6. oracle 12c 官方文档 及软件下载

    oracle 12c 官方文档 http://www.oracle.com/pls/db121/homepage oracle 12c 软件下载 http://www.oracle.com/techn ...

  7. layer.js 弹窗组件API文档

      基础参数 type title content skin area offset icon btn closeBtn shade shadeClose time id shift maxmin f ...

  8. 解决 Class not found和Base table or view not found: 1051 问题

    1.解决class not found的方法: 如果你用的是homestead虚拟机,那么,你要到虚拟机下执行: composer dump-autoload 2.解决Base table or vi ...

  9. 不能添加重复的Contact到RecipientBox中

    不能添加重复的Contact到RecipientBox中 在开始添加的操作时,判断是否已在RecipientBox中,如果已经在返回值为null的TextView. 再根据TextView判断是否nu ...

  10. Linux-内核态与用户态

    内核态: CPU可以访问内存所有数据, 包括外围设备, 例如硬盘, 网卡. CPU也可以将自己从一个程序切换到另一个程序 用户态: 只能受限的访问内存, 且不允许访问外围设备. 占用CPU的能力被剥夺 ...