centos升级openssh版本

1.现在最新包:https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.9p1.tar.gz

2.备份文件:cp -rf /etc/ssh /etc/ssh_bk

3.记录原来pid

[root@localhost ssh_bk]# ps -aux|grep ssh
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root       2407  0.0  0.0  66240  1240 ?        Ss   Jan04   0:00 /usr/sbin/sshd
root      22018  0.0  0.0 113724  6116 ?        Ss   Jan07   0:01 sshd: root@notty
root      22112  0.0  0.0  57436  2388 ?        Ss   Jan07   0:00 /usr/libexec/openssh/sftp-server
root      56258  0.0  0.0 103332   856 pts/1    S+   11:26   0:00 grep ssh
root      72854  0.0  0.0 113156  5708 ?        Ss   Jan07   0:00 sshd: root@pts/1

4.重启 service sshd restart

猜你喜欢

转载自www.cnblogs.com/lurenjia1994/p/10238165.html