Skip to content

No Replied

Linux, Cloud and Android
  • About
  • Contact Us
  • Privacy Policies

No Replied

Linux, Cloud and Android
  • About
  • Contact Us
  • Privacy Policies

SSH Without Password

  • by noreplied
  • May 10, 2010

If you have 100 Linux/Unix servers to manage, it’s painful to remember all the password. You can setup SSH without password to your server, it saves time and also secure login to all your servers. When I mentioned “secure”, it’s secure at the server side, allow Public Key login only. But, you must also consider secure your client machine, once someone granted all to your client machine, they can access to all your server without password as well 🙂 You might want to consider the risk of SSH without Password on your client machine.

Before setup SSH without password, you have to configure a few things on client machine.

Generate Keys on Client Machine

  • Follow the steps below to generate RSA/DSA Key
  • On your client machine, type: ssh-keygen -t rsa
  • When it asks for passphrase, leave it empty
  • You key should be located at .ssh/id_rsa and .ssh/id_rsa.pub
  • id_rsa is your private key, keep it for yourself only
  • id_rsa.pub is your public key, which will use on the Server Side

Setup Public Key on Server Side

Follow the step below to setup public key on server side.

  • Copy the public key on your client machine, which is id_rsa.pub
  • Access to Server Side, create .ssh directory by: mkdir .ssh
  • Create a new file named authorized_keys by: vi .ssh/authorized_keys
  • Paste the id_rsa.pub value in authorized_keys and save it
  • Change to mod of authorized_keys to 600 by: chmod 600 .ssh/authorized_keys
  • Change the mod of .ssh folder to 700 by: chmod 700 .ssh
  • Make sure .ssh folder and authorized_keys ownership is your userid

You are done, try to remote access to the server, it should not prompt your for password.

Tags:opensshremote loginsecure shellSSH

Pages

  • About
  • Contact Us
  • Privacy Policies

Recent Posts

  • How to Access Site with NET::ERR_CERT_INVALID Error in Chrome
  • How to Connect MySQL in macOS via 127.0.0.1
  • How to Fix Windows 10 temp Folder Permission Issue
  • How to Pair Apple Bluetooth Keyboard in Windows 10
  • How to Fix Exim Error: segfault at 0 ip.

Archives

  • October 2020
  • September 2017
  • March 2017
  • November 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • December 2015
  • November 2015
  • October 2015
  • August 2015
  • July 2015
  • April 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • June 2014
  • May 2014
  • August 2013
  • October 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • December 2010
  • June 2010
  • May 2010

Categories

  • Android
  • Apple
  • Facebook
  • Microsoft
  • Tips and Tricks
  • Uncategorized
  • Unix and Linux
  • Wordpress

Neve | Powered by WordPress