First, the installation of SSH server in Ubuntu and the boot SSH program is divided into: 1.Client program Openssh-client2.Service-Side Program Openssh-server If you need SSH login to another computer, need to install Openssh-client, the program Ubuntu is installed by default. If you need to connect to this machine remotely, you need to install Openssh-server, which you need to install yourself. Installing Openssh-server under Ubuntu is easy. Installing Openssh-server
$ sudo apt-get install openssh-server
See if Openssh-server is started
$ ps -e | grep ssh
Process Ssh-agent is the client, sshd is the server side, if the results have sshd process description Openssh-server has been started, if not, run the command to start.
Start, stop, and restart Openssh-server
/ etc / init d / ssh start
/ etc / init d / ssh stop
/ etc / init d / ssh restart
Configuration Openssh-serveropenssh-server configuration file is located in/etc/ssh/sshd_config, where you can configure the service port of SSH, such as: The default port is 22, can be customized to other port numbers, such as 222, You will then need to restart the SSH service. Ubuntu Configuration openssh-server Boot Auto-start open the/etc/rc.local file and add it before the exit 0 statement:
/etc/init.d/ssh start
About client connections
Clients can use SSH client software such as putty, SecureCRT, SSH Secure Shell client, enter the IP address of your server, and enter the login user and password to log in. Second, SSH client report
algorithm negotiation failedOne of the workarounds for modifying the sshd configuration file/etc/ssh/sshd_config is added in the configuration file: Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr, AES256-CTR,3DES-CBC,ARCFOUR128,ARCFOUR256,ARCFOUR,BLOWFISH-CBC,CAST128-CBC MACs Hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,hmac-sha1-96,hmac-md5-96 Kexalgorithms DIFFIE-HELLMAN-GROUP1-SHA1, DIFFIE-HELLMAN-GROUP14-SHA1,DIFFIE-HELLMAN-GROUP-EXCHANGE-SHA1,DIFFIE-HELLMAN-GROUP-EXCHANGE-SHA256, Ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,[email protected] After restarting the SSHD service, can be connected properly. The cause of this problem is the SSH upgrade, for the sake of security, the default is no longer using the original encryption algorithm, we manually add to
From for notes (Wiz)
Ubuntu SSH Server Installation and setup