Linux使用SecureCRT远程登陆终端

学习Linux两个月有余,现写上一篇我的对SecureCRT远程登陆Linux系统的看法!
linux


首先简单介绍一下SecureCRT:编程

SecureCRT是一款支持SSH(SSH1和SSH2)的终端仿真程序,简单地说是Windows下登陆UNIX或Linux服务器主机的软件vim


密钥登陆:服务器

1.使用SecureCRT建立私钥和公钥.session

SecureCRT: Quick Connect -> Authentiation -> Public Key -> Properties -> Create Identity File -> DSA/RSA -> Set Passphrase -> Donessh

这个时候在指定目录会生成两个文件,例如,私钥my_rsa和公钥my_rsa.pubide

2.linux服务器上创建.ssh目录,通常状况下,已经有这个目录学习

# mkdir /root/.sshui

# chmod 700 /root/.sshspa

3.将公钥 my_rsa.pub 传到linux服务器,将SSH2兼容格式的公钥转换成为Openssh兼容格式

# ssh-keygen -i -f Identity.pub >> /root/.ssh/authorized_keys2

# chmod 600 /root/.ssh/authorized_keys2

4.在SecureCRT里面设置登陆模式为PublicKey,并选择刚刚建立的my_rsa文件做为私钥

5.重启Linux服务器上SSH服务器

#service sshd restart 或者 /etc/rc.d/init.d/sshd restart

6.因为已经设置了密钥登陆,原来的密码登陆就彻底能够去掉

# vi /etc/ssh/sshd_config

Protocol 2 /仅容许使用SSH2

PubkeyAuthentication yes /*启用PublicKey认证

AuthorizedKeysFile .ssh/authorized_keys2 /*PublicKey文件路径

PasswordAuthentication no /*禁止密码验证登陆

PS:以上步骤是使用SecureCRT生成的密钥对来进行登陆验证的,其实也能够在服务器上使用ssh-keygen命令生成的密钥,一样在生成密钥对以后,将格式转换成SecureCRT 使用的SSH2格式


如何在SucureCRT显示vim颜色问题;

解决方法:

1.确认安装了vim-enhanced

rpm -qa | grep vim-enhanced

2.optins>session options

Terminal>emulation

xterm再勾选ASNI color,use color scheme

Apperence>current color scheme

选择traditional

单击OK

最后,disconnet而后从新链接登录就能够了

显示效果以下:

vim编程程序效果以下

相关文章
相关标签/搜索