设置远程登录安全
引用:
|
# ee /etc/ssh/sshd_config
|
代码:
port 22 //可以改成不常用端口,并在防火墙设置中作相应修改
protocol 1
hostkey /etc/ssh/ssh_host_key
PermitRootLogin no
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeyFiles .ssh/authorized_keys
PasswordAuthentication no
引用:
|
# ssh-keygen -b 1024 -t rsa1
|
一路回车默认
引用:
|
# cp /root/.ssh/identity.pub /usr/www # 复制到一个可以用ftp下载的地方
|
用ftp下载identity.pub,保存到本地;
在本地启动putty.exe(免费软件);
在session设置中填好IP和端口;
在connection-SSH-Auth中,Browse下载的identity.pub;
勾选Attempt TIS or CryptoCard auth(SSH-1);
点击open连接;
按照提示输入用户名、密码