转载自:http://blog.chinaunix.net/uid-20147410-id-3206364.html
安装了ssh服务,但是不希望他开机自动启动,可以如下设置: 在/etc/init/ssh.conf中,找到
- start on filesystem or runlevel [2345]
点击(此处)折叠或打开
- # ssh - OpenBSD Secure Shell server
- #
- # The OpenSSH server provides secure shell access to the system.
-
- description "OpenSSH server"
-
- #start on filesystem or runlevel [2345]
- stop on runlevel [!2345]
-
- respawn
- respawn limit 10 5
- umask 022
- $ ps -e | grep ssh
- 1604 ? 00:00:00 ssh-agent
- sudo service ssh start #手动启动服务
- sudo service ssh stop #手动停止服务
- sudo service ssh status #查看服务状态