Windows to Ubuntu password free login

Source: Internet
Author: User

Windows to Ubuntu password free login
  1. First check if there is a. ssh folder under the C-Drive user folder, and check if there are at least two files in the folder, one is Xxx_rsa and Xxx_rsa.pub, one is the private key file and one is the public key file.
  2. If not, execute ssh-keygen-t rsa-c "you set the name or email address" to generate a new secret key, enter will prompt you to enter the password, direct enter, do not set the password, so in (1) The folder will have a public key and a private key file
  3. After the public and private key files are available, you need to upload the public key to a server that requires a password-free login, which requires two software, one that Cmder can support some Linux commands, and a Xshell to upload files.
  4. First open the Xshell, create a new one you need to password-free login server connection, in the landing when I encountered a problem, is clearly the correct password but unable to log on to the remote server
    • This time we need to modify the configuration of the server-side ssh, first download the Start Remote Connection Service tool sudo apt-get install Openssh-server, after completing the restart under the SSH service sudo/etc/init.d/ssh restart
    • Modify the/etc/ssh/sshd-config file, pubkeyauthentication Yes to no,passwordauthentication no modify to Yes, and then restart the service again. At this point, you can use Xshell to connect to the server via a password.
  5. Then under Xshell Press ctrl+alt+f new file transfer, this time will prompt you to enter the password (because we have changed the configuration file to login by password, if not changed will prompt you to add the public key), this is Xshell command line at the beginning of the word will have SFTP
  6. Use the command put local public key address remote server you want to place the public key address, this time to view the server, my public key will be in the home folder or the root folder
  7. Locate the public key file and drop it into the/root/.ssh folder if the. ssh folder does not exist and you can create it yourself
  8. Execute the Cat public key file name >> Authrized_keys, create a new Authrized_keys file and copy the contents of the public key file inside
  9. Then change the fourth step of the SSH configuration back, and then restart the next SSH service sudo/etc/init.d/ssh restart
  10. At this point you can use the Ssh-i private key file path server username @ server address in Cmder to avoid a secret login.

    Ps:linux and Mac do not need to be so troublesome, use ssh-copy-id-i public key filename User name @ server address, behind simple configuration can be, there are many tutorials on the internet do not repeat

Windows to Ubuntu password free login

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.