准备工作
由于openssh安装可能会造成ssh无法使用,所以要先安装telnet,保证可以使用telnet协议登录服务器,以免对生产环境造成其他影响
所有需要的包都在百度网盘中
链接:https://pan.baidu.com/s/1goo1Px40jF92tjHAjNNd4A
提取码:upev
版本下载地址:https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/
#备份文件
cp -rf /etc/ssh/ /etc/ssh.bak
cp -rf /usr/local/openssh/ /usr/local/openssh.bak cp -rf /etc/init.d/sshd /etc/init.d/sshd.bak
cp -rf /usr/sbin/sshd /usr/sbin/sshd.bak
cp -rf /usr/bin/ssh /usr/bin/ssh.bak
cp -rf /usr/bin/ssh-keygen /usr/bin/ssh-keygen.bak
- 安装telent
#查看selinux的状态,必须为关闭状态
[root@localhost ~]#