Install and configure OpenSSH in Ubuntu Server 13.10

Source: Internet
Author: User
Tags openssh server ssh server

Openssh-server is not installed in Ubuntu by default. to access it through the SSH protocol, you must install the ssh server. For installation, select apt-get on Ubuntu. Next we will discuss how to use apt-get + configuration proxy to download and install openssh-server.

Setp1:

Check if ssh is installed

Command: dpkg -- list | grep ssh

Appears:

If openssh-client and openssh-server are installed

If not, enter the following command:

Sudo apt-get install openssh-server

 

Later, Ubuntu automatically downloads and installs openssh server, and resolves all dependencies. After completing this operation, you can find another computer and then use an SSH client (PuTTy is strongly recommended) to enter the IP address of your server. If everything is normal, you can connect later. You can log on with the existing user name and password.

Step 2: Check whether ssh is enabled

Command: ps-ef | grep ssh

Appears:

If there is an ssh keyword, it indicates that it has been started.

If it is not started, enter the following command: sudo/etc/init. d/ssh start

After startup:

* Starting OpenBSD Secure Shell server sshd [OK] indicates that the startup is successful.

To stop the service, run the following command: sudo/etc/init. d/ssh stop

After startup:

* Stopping OpenBSD Secure Shell server sshd [OK] indicates that the stop is successful.

OpenSSH Server is installed. To ensure network installation, further settings and optimization are required, which can shorten OpenSSH logon time and improve security and reliability. All of this is implemented by modifying the openssh configuration file sshd_config.

First, open the sshd_config file:

#/Etc/ssh/sshd_config

Find the GSSAPI options section and comment out the following two lines:

# GSSAPIAuthentication yes

# GSSAPIDelegateCredentials no

Using PuTTy to log on to the SSH service through certificate authentication, all the content is encrypted and the security is basically guaranteed. However, if you can use the Certificate for authentication, the security will be further improved, and after some settings, you can also achieve the effect of automatic login for certificate authentication.

Then modify and enable the certificate authentication option:

RSAAuthentication yes

PubkeyAuthentication yes

AuthorizedKeysFile % h/. ssh/authorized_keys

Next, we need to create a private key and a public key for the SSH user. First, you need to log on to the account that requires key establishment. Here, you must exit the root user. If necessary, use the su command to switch to another user. Then run:

Ssh-keygen

Here, we can store the generated key in the default directory. The passphrase will be prompted During the creation process. This is equivalent to adding a password to the certificate, which is also a measure to improve security.

The ssh-keygen command generates two keys:

After all settings are complete, restart the server. Then use an SSH client software (PuTTy is strongly recommended) to log on to the host that has installed the SSH service and enter the correct key so that you can remotely manipulate it.

This is the PuTTY software interface.

Enter the user name and password for remote control!

OpenSSH details: click here
OpenSSH: click here

Solve the latency problem during remote login through OpenSSH

Offline installation of OpenSSH in Ubuntu 12.10

OpenSSH upgrade steps and precautions

Solutions for failures of common OpenSSH users

General thread: OpenSSH key management, Part 1 Understanding RSA/DSA authentication

Install OpenSSH and configure the sftp lock directory for RedHat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.