SSH login without password from Windows to Ubuntu Server 16.04.1 LTS

Posted: October 6, 2016 in Linux

Passwordless connection is commonly used during automatic backups with scripts, synchronization files using scp and remote command execution.In this example we’ll configure SSH login without password between windows 10 client and Ubuntu Server ( for user ja

Windows side setup

Download and install putty,after installation run PuTTygen


Make sure SSH-2 RSA is selected and click generate


During key creation move mouse within selected area


You’ll get public key,select save public key (save it to safe location) and DON’T CLOSE THIS WINDOW YET !!.Optionally,you can put some comment.


Ubuntu config:

If already didn’t,install openssh server:

sudo apt-get install openssh-server

In user home directory create .ssh folder,and within it,authorized_keys file (in my case,username is “ja”)

sudo mkdir /home/ja/.ssh
sudo touch /home/ja/.ssh/authorized_keys

Set folder and file permission (note !!,on the web there are suggestions to set chmod -R 700 .ssh/ but in my case it didn’t work-get permission denied error message)

chmod 755 /home/ja/.ssh
chmod 644 /home/ja/.ssh/authorized_key

Edit sshd_config file:

LogLevel DEBUG3 #verbose log in case of problems

Now copy public key from windows machine to /etc/ja/.ssh/authorized_keys file

restart sshd service:

sudo service sshd restart

Windows config-part II:

In putty Connection-Data,enter linux user name


ssh-auth-browse:path to public file (saved during key generation)


sesion-enter IP address or DNS name and save config


In case of issue:

tail -f /var/log/auth.log

Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s