Ubuntn 14.04 SSH client and server installation and configuration

Source: Internet
Author: User
Tags server installation and configuration ssh ssh server


1. Install the server

Sudo apt-get install openssh-server

 

2. Install the client

Sudo apt-get install openssh-client

 

3. Start the service

Sudo server ssh start // enable sudo server ssh stop // stop sudo server ssh restart // restart sudo server ssh status // status

 

4. Server configuration

 

The "/etc/SSH/sshd_config" configuration file is used for the ssh server configuration, the settings of these options are described in the configuration file and can be viewed with "man sshd. Note that OpenSSH does not have different configuration files for SSH 1.x and 2.x.

Note the following in the default settings:

 

Port 22

 

This is the default port number. If it is changed, you need to connect-p to the new port number in the connection command background.

PermitRootLogin without-password

 

It is best to set this option to "PermitRootLogin without-password", so that the "root" user cannot log on from a computer without a key. Setting this option to "no" will disable "root" user logon. You can only use the "su" command to convert it from a common user to "root ".

X11Forwarding yes

 

Set this option to "yes" to allow the user to run the X program on the remote host. Even disabling this option does not improve server security because users can install their own forwarder (forwarder). See "man sshd ".

# PasswordAuthentication yes

 

Set this option to "no" and only allow users to log on using the key-based method. This will of course cause trouble for users who often need to log on from different hosts, but it can greatly improve the system security. Password-Based logon has many weaknesses.

Subsystem sftp/usr/lib/openssh/sftp-server

This option allows users to use secure FTP

 

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.