Ubuntu Settings ssh

Source: Internet
Author: User

  1. What is SSH? SSH is a secure and reliable protocol for remote logins, usually on a server with SSH service, providing SSH remote blocking service for clients with two modes:
    • Password Login: First, create a new user on the server, set a password for the new user, the server above the SSH service, then the client can SSH
    • Key login: First in the client, generate a pair of keys, divided into public and private keys, the client holds the private key, the public key is sent to the server side, there is the login user name in the directory. Ssh/authorized_keys


  2. Ubuntu under Configuration
    • Ubuntu does not install the SSHD service by default, via the command: sudo apt-get install Openssh-server
    • Create the sshd daemon PID storage path/var/run/sshd:sudo Apt-get install/var/run/sshd
    • Open service:
      • /etc/init.d/ssh start
      • Service sshd Start
    • Create an instance User: Useradd-d/home/shili shili
      • Modify user password: sudo passwd shili
      • Create a folder under the user's home directory. SSH, and file. Ssh/authorized_keys, which is used to store authenticated SSH login clients
    • On the client
      • Using ssh-keygen-t RSA to generate a key pair, all the way back, the generated two keys Id_rsa and id_rsa.pub now need to do is to upload the public key to the server side
      • Under the current user home directory, the two keys that will be generated in the previous step will be stored under the ~/.ssh/folder
        Execute SCP ~/.ssh/id_rsa.pub [email protected]:.ssh/
        A password is required during execution, which is a password created on the server side for user Shili
      • When you're done, you can log in with the key.

Ubuntu Settings ssh

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.