Leave a comment

Configure passwordless ssh to localhost

How to configure passwordless ssh to localhost? Read on for steps.

  • Execute the below command to check if ssh to the localhost is without a password:
    ssh localhost
  • If it does not work, execute the following commands:
    ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
    cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
  • Try ssh localhost and check if it works. Read below, if still it does not work…
  • check if SSH Server is installed.
    pgrep sshd
  • If not installed, run
    sudo apt-get install openssh-server
    Note : This is for Linux Ubuntu. Please check for other flavors/OS.
  • Run following command to check if ssh is running.
    service ssh status
  • If not running, execute:
    service sshd start
  • Run following command, (if ssh to localhost is not yet passwordless)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: