SecureCRT连接linux

  安装完centos系统后,在vmware里面操作是很不方便的,这时候我们可以用SecureCRT这个工具来实现我们多任务窗口工作。
  一般操作系统安装都会自带安装openssh-server,如果没安装,请自行安装。
  本文主要是通过ssh2协议来连接:连接方式:1密码连接,2 RSA非对称密钥连接

1 密码连接
vi /etc/ssh/sshd_config

sshd配置如下:
引用
Port 22

Protocal 2

最后重启sshd服务
service sshd restart

SecureCRT配置
SecureCRT连接linux

连接成功后如下:
SecureCRT连接linux

如果要按原unix颜色方案,如下设置

SecureCRT连接linux

SecureCRT连接linux

2 RSA连接
sshd配置如下:
引用
Port 22

Protocal 2

RSAAuthentication yes

AuthorizedKeysFile  .ssh/authorized_keys

PasswordAuthentication no

如果你没发现.ssh目录,你可以自己mkdir创建;也可以执行下面指令,随意输入no后,系统会自动生成。
ssh -l root 192.168.7.224

cd ~/.这时可以看到.ssh目录

SecureCRT生成密钥步骤:
1
SecureCRT连接linux

2
SecureCRT连接linux

3
SecureCRT连接linux

4
SecureCRT连接linux

5注意这里key有两种格式:standard和openssh。不同的格式,后面将key导入authorized_keys文件中方法不同
SecureCRT连接linux

6将刚才生成的Identify.pub传到linux ~/.ssh目录下
cd ~/.ssh
rz

SecureCRT连接linux

7 导入Identify.pub到authorized_keys
如果key是standard方式生成的,执行下面指令
ssh-keygen -i -f Identity.pub >> authorized_keys

如果你的key是openssh方式生成的,执行下面指令
cat Identify.pub >> authorized_keys

完成后,重启ssh服务
service sshd restart

SecureCRT连接linux

8
SecureCRT连接linux

9
SecureCRT连接linux

10
SecureCRT连接linux









你可能感兴趣的:(linux,secureCRT,centos,ssh)