Turn: http://blog.chinaunix.net/uid-20791108-id-3761681.html
1. Install
Openssh-client is installed by default in Ubuntu, so it is not installed here. If your system is not installed, use apt-get to install it.
Install SSH-Server
Sudo apt-Get install OpenSSH-Server
Install SSH-Client
Sudo apt-Get install OpenSSH-Client
2. Check whether sshserver is installed.
PS-E | grep sshd
450? 00:00:00 sshd
If you see sshd, it indicates that the ssh-server has been started.
If only SSH-agent is available, it indicates that the ssh-server has not been started. You need to run the following command to start the SSH service:
/Etc/init. d/ssh start;
Note: Only sshd is displayed in the ubuntu-12.04-server-i386.iso installation:
3. Extended Configuration
The default SSH service port is 22. You can define it as another port, such as 222. The configuration file to be modified is:
/Etc/ssh/sshd_config
Modify the port parameter to 222.
Then restart the SSH service:
Sudo/etc/init. d/ssh restart