3.远程连接虚拟机
1.9 使用putty远程连接linux
打开putty,填入虚拟机的ip,端口一般为22,并将其保存为一个会话,命名,保存一下,点open即可连接
一些优化配置:
回滚行数:
传输字符集:
1.10 使用Xshell连接linux
和putty类似,新建一个会话:
填入会话名称,虚拟机ip,端口号,点确定保存即可连接
还可以直接填入用户名密码:
在这里还可以调整选项卡的排列方式:
1.11/1.12 **认证
使用PuTTYgen生成秘钥
点击生成并在空白区域移动鼠标:
生成后如下图所示,分别保存公钥和私钥:
在服务器上放置公钥:
[[email protected] ~]# mkdir /root/.ssh
[[email protected] ~]# chmod 700 /root/.ssh
[[email protected] ~]# vi /root/.ssh/authorized_keys
[[email protected] ~]# setenforce 0
在客户端放置私钥:
再次登录使用秘钥认证:
使用Xshell生成秘钥:
依照向导提示很容易生成**对,在服务器上放置公钥的方式与putty类似,在客户端指定使用**认证并选择对应的秘钥,再次登录即使用秘钥认证:
SecureCRT通过**登录:
/etc/ssh/sshd_config
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
/etc/ssh/sshd_config //This is the sshd server system-wide configuration file. If you want to change the port on a SELinux system, you have to tell SELinux about
this change.
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#RSAAuthentication yes
#PubkeyAuthentication yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes