今天是4月30日
我的系统被黑客入侵了,导致系统全面瘫痪,因此我重装系统了
现在正在配置ssh,这里记录一下
客户端:
ssh-keygen
# 一路回车即可
cd ~/.ssh
scp id_rsa.pub root@192.168.1.2:.ssh/authorized_keys
服务端:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
vim /etc/ssh/sshd_config
#关闭密码登录
PasswordAuthentication no
#启用密钥验证
RSAAuthentication yes
PubkeyAuthentication yes
按esc,输入 :wq
重启ssh
service sshd restart#centos系统
service ssh restart#ubuntu系统
/etc/init.d/ssh restart#debian系统