debian安装ssh服务

安装

apt-get install openssh-server

安装完成以后,可以通过以下命令看到它们运行的进程:

ps -e |grep ssh
#输出:
1943    ?      00:00:00   ssh-agent        #表示客户端已运行;
16322  ?      00:00:00   sshd              #表示服务端已运行;

允许root用户ssh连接

我自己的修改为:增加了 root登录的权限。
修改/etc/ssh/sshd_config

#  修改前
PermitRootLogin  without-password
# 修改后
PermitRootLogin yes

然后重启ssh服务
修改后以后,我们需要重新启动服务:

#方法一:
 /etc/init.d/ssh restart

# 方法二:
service ssh restart

参考

https://www.cnblogs.com/yinheyi/p/6266748.html

猜你喜欢

转载自blog.csdn.net/lxyoucan/article/details/128648306