http://blog.itpub.net/15693674/viewspace-767572/
[oracle@vrh1 .ssh]$ cat id_dsa.pub >> authorized_keys
#将本机vrh1上的dsa保存到授权文件中
[oracle@vrh1 .ssh]$ cat id_rsa.pub >> authorized_keys
#将本机vrh1上的rsa保存到授权文件中
[oracle@vrh1 .ssh]$ ssh vrh2 cat ~/.ssh/id_dsa.pub >> authorized_keys
#将vrh2上的dsa保存到授权文件中
Linux Server1:192.168.1.104
Linux Server2:192.168.1.105
终端:SSH Secure Shell Client
1.用password方式登录Linux Server1和2
2.在Linux Server1上命令操作如下:两台服务器都要输入
#ssh-keygen -t dsa
并三次回车
#cd .ssh/
#cp id_dsa.pub authorized_keys
#chmod 600 authorized_keys
#scp -P22 * root@192.168.1.105:/root/.ssh
报错:RSA host key for mysharebook.cn has changed and you have requested strict checking.
Host key verification failed.
解决方法:
这是Linux重装或则openssh-server重装引起的,执行以下命令即可
ssh-keygen -R 192.168.87.36 192.168.87.36换成你要连的服务器就可以了。
其中在scp的时候 会提示Are you sure you want to continue connecting (yes/no)?
确定输入yes进行确认,之后会提示root@192.168.1.105′s password: 要求输入root密码
我们在Linux Server1(192.168.1.104)上ssh连接Linux Server2(192.168.1.105),看下是否正常
#ssh 192.168.1.105
然后在Linux Server2(192.168.1.105)上ssh连接Linux Server1(192.168.1.104),看下是否正常
如果提示:Are you sure you want to continue connecting (yes/no)? 输入yes即可
到目前为止 已经配置好Linux Server1和Linux Server2的SSH互相信任,SSH连接并不需要密码
[oracle@vrh1 .ssh]$ cat id_dsa.pub >> authorized_keys
#将本机vrh1上的dsa保存到授权文件中
[oracle@vrh1 .ssh]$ cat id_rsa.pub >> authorized_keys
#将本机vrh1上的rsa保存到授权文件中
[oracle@vrh1 .ssh]$ ssh vrh2 cat ~/.ssh/id_dsa.pub >> authorized_keys
#将vrh2上的dsa保存到授权文件中
Linux Server1:192.168.1.104
Linux Server2:192.168.1.105
终端:SSH Secure Shell Client
1.用password方式登录Linux Server1和2
2.在Linux Server1上命令操作如下:两台服务器都要输入
#ssh-keygen -t dsa
并三次回车
#cd .ssh/
#cp id_dsa.pub authorized_keys
#chmod 600 authorized_keys
#scp -P22 * root@192.168.1.105:/root/.ssh
报错:RSA host key for mysharebook.cn has changed and you have requested strict checking.
Host key verification failed.
解决方法:
这是Linux重装或则openssh-server重装引起的,执行以下命令即可
ssh-keygen -R 192.168.87.36 192.168.87.36换成你要连的服务器就可以了。
其中在scp的时候 会提示Are you sure you want to continue connecting (yes/no)?
确定输入yes进行确认,之后会提示root@192.168.1.105′s password: 要求输入root密码
我们在Linux Server1(192.168.1.104)上ssh连接Linux Server2(192.168.1.105),看下是否正常
#ssh 192.168.1.105
然后在Linux Server2(192.168.1.105)上ssh连接Linux Server1(192.168.1.104),看下是否正常
如果提示:Are you sure you want to continue connecting (yes/no)? 输入yes即可
到目前为止 已经配置好Linux Server1和Linux Server2的SSH互相信任,SSH连接并不需要密码
发表评论
-
挂载磁盘
2017-02-27 14:59 0fdisk -l mkfs.ext4 /dev/xv ... -
linux https nginx
2016-06-08 09:14 429##创建证书存放目录:mkdir /usr/loc ... -
不是apache进行ab测试
2015-05-20 15:21 350930 wget http://apache.faye ... -
修改linux允许打开文件最大数
2015-05-18 13:39 626设置用户最大打开文件数:vi /etc/security/l ... -
linux ftp 安装笔记
2015-01-19 17:05 450配置Vsftpd 安装完之后我们要对它进行配置,才能正常 ... -
nginx php-fpm安装配置
2014-12-26 22:03 712http://www.nginx.cn/231.ht ... -
linux笔记
2015-01-12 13:46 334删除10天以外的数据: find ./ -type f ... -
Linux centos 搭建SVN 服务器
2014-03-20 17:08 609一. SVN 简介 Subversion( ... -
linux命令记录
2013-12-20 17:14 0rsync --daemon --config /etc ... -
svn添加用户
2013-11-19 16:42 1121转载:http://blog.chinaunix.ne ... -
magent+memcached 配置问题详解
2013-11-04 14:28 1303一.软件下载 wget http://memcached. ... -
linux上运行java工程脚本
2013-04-02 09:40 639#!/bin/bashecho ""ech ... -
linux下tomcat的安装
2013-03-05 09:12 633本文主要内容:(1)安装apr,这是 Apache 为了 ... -
centos 5.4+mysql5.5 解压版
2012-11-24 16:55 0http://www.iteye.com/topic/1128 ... -
CMAKE参数参考
2012-11-24 15:17 645CMAKE参数参考MAKE_INSTALL_PREFIX my ... -
linux定时任务的设置
2012-11-24 08:55 693为当前用户创建cron服务 ... -
ssh能够连接而sftp不能连接的解决方法
2012-11-19 15:24 4580ssh能够连接而sftp不能连接的解决方法 昨天 ... -
centos5.4ftp安装方法
2011-02-23 22:25 736a.在光盘中找到 F:\LinuxTool\CentOS\Ce ... -
【Linux】redhat enterprise 5 如何正确安装gcc
2010-11-10 21:11 1484安装步骤及正确的安装顺序: rpm -ivh ke ... -
Linux学习随手笔记
2010-11-09 23:38 718java.sun.com chown -R root:user ...
相关推荐
linux如何配置双机SSH信任然后双向免密码登陆.docx
SSH Secure Shell Client用public key认证登录
介绍:Linux多主机双机互信脚本 说明 usage: ./ssh_key.sh user host password ssh-pub-key ssh-key port usage: ./ssh_key.sh root host131 pass123 /root/.ssh/id_rsa.pub /root/.ssh/id_rsa 22
本篇文章小编为大家介绍,Linux中配置双机SSH信任 操作说明。需要的朋友参考下
ssh登录使用radius服务器认证配置方法
ssh通过public_KEY登录20131101.pdf
配置linux ssh免密码登录,第一行生成密钥,第二行是要对哪台机器免密码ssh登录就配置成哪一台,这里root@hadoop00,root是用户名,hadoop00是主机名
Linux配置ssh免密码登录调试文档,对配置hadoop有帮助
NULL 博文链接:https://xls.iteye.com/blog/1446687
解决的问题为 git 配置多个ssh key 我们配置好两个 sshkey 后 分别为两个 如果是 github.com gitlab.com gitee.com 这三个当然没有问题 开发此工具碰到的问题是 开发者碰到同一代码托管平台 来自多个账号的 sshkey ...
Linux制作RSA KEY并配置SSH客户端或服务器免密码访问
3.1 linux ssh的安装 首先检查Linux是否安装ssh Rpm –p sshd 如果安装好了将显示 SSH的版本信息,否则请下载安装包进行安装。 下载:openssh-1.2.3.tar.gz。 1)编译OpenSSH需要zlib-devel软件包,这个软件包包括...
CentOS利用expect批量推送ssh public key的脚本
在远程主机上,需要使用ssh 运行指令,如何配置公钥,私钥,本机就能远程执行指令和脚本。
Linux_SSH配置和禁止Root远程登陆设置文档
连接Linux服务器工具SSH 3.2.9 方便快捷!
CentOS或Linux系统SSH安装配置、SSH密钥配置远程登录
Linux 自动更新sshkey秘钥 kown-host文件
ssh配置文件ssh配置文件ssh配置文件ssh配置文件