4

Ubuntu18.04下安装配置SSH服务

 2 years ago
source link: https://blog.p2hp.com/archives/8423
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Ubuntu18.04下安装配置SSH服务 | Lenix Blog

  • 安装ssh工具

1.打开终端键入如下命令:

  1. apt-get update
  2. apt-get install openssh-server

2.选择Y继续执行:

  • 启动SSH服务

1.键入如下命令:

/etc/init.d/ssh start

注:重启命令与关闭命令如下:

  1. /etc/init.d/ssh restart   #重启SSH服务
  2. /etc/init.d/ssh stop      #关闭SSH服务

2.查看进程,检查是否启动成功,键入如下命令:

ps -e | grep sshd

有了进程才能进行SSH服务的使用。

  • 配置root用户SSH服务

Ubuntu中SSH服务安装完成后查看是否允许root用户登陆,若不允许则无法远程登陆root用户,需要修改配置

1.首先,打开“/etc/ssh/sshd_config”

gedit /etc/ssh/sshd_config

2.查看是否有“PermitRootLogin yes”,没有添加即可,完成后保存退出


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK