OpenSsh 连接 ssh2 的测试
来源:互联网 发布:苹果手机修改游戏数据 编辑:程序博客网 时间:2024/06/05 04:35
公司的两天机器, 做 primary server 切换到standby server 测试,key 也相应的调整:
Purpose:
Source server: Openssh (server A)
Target server: Ssh2 (server B)
step1:
In A,
generate key in dsa type:
(incude the private key and public key)
command:
/home/dbsrun/.ssh>ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/dbsrun/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/dbsrun/.ssh/id_dsa.
Your public key has been saved in /home/dbsrun/.ssh/id_dsa.pub.
The key fingerprint is:
97:0d:08:e7:d2:7e:17:2d:4e:28:1c:1a:e7:67:eb:fc dbsrun@SYSA
/home/dbsrun/.ssh>
/home/dbsrun/.ssh>mv id_dsa.pub dbsrun_SYSA.pub
/home/dbsrun/.ssh>ls -l
total 12
-rw-r--r-- 1 dbsrun other 601 Aug 31 17:47 dbsrun_SYSA.pub
-rw------- 1 dbsrun other 668 Aug 31 17:47 id_dsa
-rw-r--r-- 1 dbsrun other 1115 Jul 29 18:23 known_hosts
/home/dbsrun/.ssh>mv id_dsa dbsrun_SYSA
/home/dbsrun/.ssh>ls -la
total 20
drwxr-xr-x 7 dbsrun other 2048 Aug 31 17:21 ..
drwx------ 2 dbsrun other 2048 Aug 31 17:48 .
-rw------- 1 dbsrun other 668 Aug 31 17:47 dbsrun_SYSA
-rw-r--r-- 1 dbsrun other 601 Aug 31 17:47 dbsrun_SYSA.pub
-rw-r--r-- 1 dbsrun other 1115 Jul 29 18:23 known_hosts
/home/dbsrun/.ssh>cp -pi dbsrun_SYSA.pub Authorized_keys
/home/dbsrun/.ssh>ls -la
total 24
drwx------ 2 dbsrun other 2048 Aug 31 17:49 .
drwxr-xr-x 7 dbsrun other 2048 Aug 31 17:21 ..
-rw-r--r-- 1 dbsrun other 601 Aug 31 17:47 Authorized_keys
-rw------- 1 dbsrun other 668 Aug 31 17:47 dbsrun_SYSA
-rw-r--r-- 1 dbsrun other 601 Aug 31 17:47 dbsrun_SYSA.pub
-rw-r--r-- 1 dbsrun other 1115 Jul 29 18:23 known_hosts
/home/dbsrun/.ssh>cp -pi dbsrun_SY/home/dbsrun/.ssh>ls -l
total 20
-rw-rw-rw- 1 dbsrun other 601 Aug 31 17:47 Authorized_keys
-rw------- 1 dbsrun other 668 Aug 31 17:47 dbsrun_SYSA
-rw-r--r-- 1 dbsrun other 601 Aug 31 17:47 dbsrun_SYSA.pub
-rw------- 1 dbsrun other 668 Aug 31 17:47 identity
-rw-r--r-- 1 dbsrun other 1115 Jul 29 18:23 known_hosts
step2:
Change the Openssh to ssh2:
/home/dbsrun/.ssh>ssh-keygen -e -f dbsrun_SYSA > dbsrun_SYSA.pub.ssh2
step3:
copy the key:(dbsrun_SYSA.pub.ssh2) to server B : /home/dbsrun/.ssh2
vi authorization
add below line to the end:
key dbsrun_SYSA.pub.ssh2
step4:
Let us do the test:
from server A to remote login B:
/home/dbsrun/.ssh>hostname
SYSA.SYSA
/home/dbsrun/.ssh>ssh dbsrun@10.240.132.72
sshd[1007688]: WARNING: Bad line in /etc/environment: set -o vi
Last login: Wed Aug 31 2011 19:05:32 +0800 from 10.240.129.67
#########################################################################
# This system is for the use of authorized users only.
## Individuals using this computer system without authority, or in
## excess of their authority, are subject to having all of their
## activities on this system monitored and recorded by system
## personnel.
##
## In the course of monitoring individuals improperly using this
## system, or in the course of system maintenance, the activities
## of authorized users may also be monitored.
##
## Anyone using this system expressly consents to such monitoring
## and is advised that if such monitoring reveals possible
## evidence of criminal activity, system personnel may provide the
# evidence of such monitoring to law enforcement officials.
#########################################################################
You have new mail.
(dbsrun@a05gcpgapp01)/home/dbsrun>
step5:
let us summary the "key exchange" key point:
Openssh ---> SSH2
ssh-keygen -t -e openssh_key (private key) > key_ssh2.pub
- OpenSsh 连接 ssh2 的测试
- 再谈ssh2的测试
- OpenSSH免密码登录SSH2
- SSH2免密码登录OpenSSH
- SSH2免密码登录OpenSSH
- SecureCRT/openssh用DSA连接的方法。
- 关于openssh连接时的尝试
- SSH2环境搭建+简单的登录测试
- 用OpenSSH连接TQ2440
- ssh2 配置 连接数据库
- [node]nodejs ssh2测试
- 使用OPENSSH连接越狱后的iphone实…
- Xshell 连接ubuntu16.04下的OpenSSH报错
- Ganymed ssh2 连接ftp server获取server的file
- OpenSSH key pem和SSH2 key格式互转
- ssh2远程连接linux服务器
- ssh2无法连接目标机器
- openssh-server和openssh-clients的区别
- Microsoft 神经网络算法(Analysis Services – 数据挖掘)
- C++各种基本问题
- 菜鸟笔记7——调试方法,log
- Android蓝牙扫描设备过程
- poj 1698(最大流)
- OpenSsh 连接 ssh2 的测试
- GRUB整体分析
- C++常用函数(续)
- 2011_08_31_转自看雪论坛...方便自己回忆.........
- 回车焦点跳到下一个TextBox。
- hdu 3905
- interview questions and riddles sites【面试相关网站】
- 坚持不懈,直到成功-I will persist. I will win.
- .NET Framework 4.0海报