安装ssh服务

状态:service sshd status

CentOS


1.先更新下源

sudo apt-get update

2.安装ssh服务

sudo apt-get openssh-server

3.配置ssh-server,配置文件位于/etc/ssh/sshd_config,默认的端口是22,为了安全,一般自定义为其他端口,然后重启

sudo /etc/init.d/ssh resart

可以使用putty或Xshell远程登录

如此便说明ssh已经成功的启动了。

Ubuntu


 sudo apt-get install openssh-server

然后确认sshserver是否启动了:(或用“netstat -tlp”命令)

  ps -e | grep ssh

修改SSH密码


passwd root

THE END


原文地址:https://www.cnblogs.com/xishaonian/p/6144785.html