Ubuntu 下开启和配置 SSH

docker

Ubuntu Server 安装时会有一个地方让选择组件,其中有OpenSSH Server,如果忘记选,可以在后期通过apt-get进行选装。

Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers.

OpenSSH, a free version of the SSH connectivity tools developed by the OpenBSD Project.

1
$ sudo apt-get install openssh-server

安装成功后,可以打开sshd_config进行配置

1
$ sudo gedit /etc/ssh/sshd_config

重启SSH服务后生效。

1
$ sudo /etc/init.d/ssh restart