# service ssh start# service ssh stop# service ssh restart
若是有警告提示的话,能够尝试第二种 service 方式。警告提示:
1
2
3
4
5
6
7
root@Tbox:~/.ssh# /etc/init.d/ssh start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service ssh start
Since thescript you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start ssh
ssh start/running, process 3717
即:
1
root@Tbox:~# service ssh start
此时则不会出现刚才的提示。
验证是否安装成功
成功的提示以下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
root@Tbox:~/.ssh# ssh localhost
root@localhost's password:
Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 3.13.0-32-generic x86_64)
* Documentation: https://help.ubuntu.com/
298 packages can be updated.
251 updates are security updates.
Newrelease '14.04.4 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Your Hardware Enablement Stack (HWE) is supported until April 2017.
Last login: Wed Jun 2913:55:072016 from localhost
root@Tbox:~#