在讲下文之前,我都默许大家都已经生成了自己的ssh公钥和密钥,在自己的~/.ssh 目录下面,如果没有,请使用 ssh-keygen -t rsa -C "你的邮箱" 命令生成1,上传自己的公钥到远程主机中公钥生成后,一般是 ~/.ssh/id_rsa.pub 文件,后面的pub就是public开放...
分类:
其他好文 时间:
2015-06-01 22:11:34
阅读次数:
102
#####批量部署ssh私钥认证#####一、首先安装expect,直接yum即可二、批量部署ssh私钥脚本batch_sshkey.sh==============================================================#!/bin/bashcd/rootcat/root/.ssh/id_rsa.pub>/root/.ssh/authorized_keysforiin`catip.txt`doip=$(e..
分类:
系统相关 时间:
2015-05-31 01:37:29
阅读次数:
344
scp异地备份A主機1.用oracle用戶登入:192.17.28.52.產生公鑰與私鑰:id_rsa為私鑰,id_rsa.pub為公鑰cd/home/oracle/.ssh--要確保.ssh文件夾,其它用戶或用戶組沒有W寫的權限,否則將無效.[oracle@ytdbbackup.ssh]$ssh-keygen-trsa--有提示默認回車就OK3.將公鑰復制給要免密碼的..
分类:
其他好文 时间:
2015-05-27 16:07:59
阅读次数:
224
在A机上用ssh root@B机ip?直接免密码登陆 在A机上 #ssh-keygen -t rsa还可以选择dsa只是算法不同。 会自动在当前用户下生成.ssh目录,然后在该目录下.ssh/id_rsa和 id_rsa.pub两个文件 现在就是要把自己的公钥给...
分类:
其他好文 时间:
2015-05-27 12:32:45
阅读次数:
122
默认远程主机上已经存在 ~/.ssh 目录。在自己PC上执行下面脚本,输入服务器用户名和ip地址,下次登录可实现无密码登录。
#!/bin/bash
id_res_pub=~/.ssh/id_rsa.pub
if [ ! -f "$id_res_pub" ];then
ssh-keygen -t rsa
else
echo "id_rsa.pub is exist!"
fi
ec...
分类:
系统相关 时间:
2015-05-23 10:03:33
阅读次数:
166
步骤1: 用 ssh-key-gen 在本地主机上创建公钥和密钥 ligh@local-host$ ssh-keygen -t ?rsa Enter file in which to save the key (/home/jsmith/.ssh/id_rsa):[Enter key] Enter passphrase (empty for no passp...
分类:
其他好文 时间:
2015-05-21 20:00:41
阅读次数:
169
背景:有A、B两台CentOS6.2系统;A:192.168.12.128;B:192.168.12.133;目标:实现A、B设备相互无需密码登陆;过程:一、登陆A设备:#cd/root/.ssh/#ssh-keygen-trsa生成秘钥(id_rsa;id_rsa.pub),过程直接空格;#cpid_rsa.pubauthorized_keys#chmod600authorized_keys#scp..
分类:
其他好文 时间:
2015-05-18 13:09:12
阅读次数:
127
背景:有A、B两台CentOS6.2系统;A:192.168.12.128;B:192.168.12.133;目标:实现A、B设备相互无需密码登陆;过程:一、登陆A设备:#cd/root/.ssh/#ssh-keygen-trsa生成秘钥(id_rsa;id_rsa.pub),过程直接空格;#cpid_rsa.pubauthorized_keys#chmod600authorized_keys#scp..
分类:
其他好文 时间:
2015-05-18 13:09:02
阅读次数:
122
1.单向无密钥配置station213->station220:步骤一:输入命令:ssh-keygen一路回车。。[root@station213~]#ssh-keygen
Generatingpublic/privatersakeypair.
Enterfileinwhichtosavethekey(/root/.ssh/id_rsa):
/root/.ssh/id_rsaalreadyexists.
Overwrite(y/n)?步骤二:生成..
分类:
系统相关 时间:
2015-05-14 14:27:41
阅读次数:
256
github使用SSH链接,需要设置SSH1.检查SSH key cd ~/.ssh2.备份已有的key,(如果有的话) mkdir key_backup mv id_rsa* key_backup3.生成SSH key$ ssh-keygen -t rsa -C jonezhang86@gmail...
分类:
系统相关 时间:
2015-05-12 20:35:55
阅读次数:
232