SSH access without password

SSH access without password

SSH is a network protocol of session layer that allows for a remote control of operating system and TCP-connection tunneling (e.g. in the cases of files exchange).

SSH , also, provides for safe transfer of practically any other network protocol in the unprotected environment.

Very often, for the purpose of managing, when one has to log into a particular computer (or server) the latter generates a password request. In a situation when the logging needs to be performed often,  entering the same thing over and over again is quite annoying. And what if you have to access many servers and each of them asks for a unique password?

SSH protocol makes it possible to log into a remote server without entering password (it comes handy, e.g., in the cases of reserve copying and file publication,  etc).

Needless to say that it only takes the above to handle the password issue, for the public key user identification serves for that purpose, too, (the key that will serve as an the user identifier to be recognized by the remote computer).

1. First a web developer has to create pair of keys - public and private -  for the specific user on the client computer.

It's done with the help of utility ssh-keygen.

$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):                # Путь где будет сохранен наш ключ <Enter>
Created directory '/home/user/.ssh'.                                                                
Enter passphrase (empty for no passphrase):                                               # Пароль для защиты ключа, если пусто - без пароля
Enter same passphrase again:
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/
The key fingerprint is:
63:4b:1c:ea:30:f3:d5:c8:3c:77:73:ea:bb:9c:6f:64 user@client
The key's randomart image is:
+--[ RSA 2048]----+
|        .                   |
|       = +                |
|    + . S o o            |
|     * + = . +E         |
|      o .   .o             |
|           o               |
|        *=.               |

To have the key generated, we have used a crypthographic algorithm RSA

The two keys will appear in: id_rsa and id_rsa.pubIn home directory in subcategory .ssh 

2. Then we have to copy our open key ( on the server, and we'll do the next command for that

$  ssh-copy-id

or else, we just copy-paste our public key file into the same server the following way

$ scp ~/.ssh/

After that we can log into the remote computer without entering password.

$ ssh

But sometimes, when the server access port happens to have been changed, the situation gets no more standard. For such cases we need to make use of the key - p XXXX where XXXX is access port to server.

5 votes, Rating: 5

Read also


If you know what jQuery is or you just start studying it, then you’ll definitely be interested in how to write your own jQuery plugin. It’s very easy to do that. You’ll be able to create your own...


When registering on a site a user will normally be asked for password verification which is required in Drupal by default.

It happens very often that sorting on a specific criterion should be done. Views, Nodequeue, Flag and other similar modules are used for that. But sometimes functional of these modules is not enough...

Pressflow is Drupal’s distributive that provides advanced efficiency and scaling. It’s developed by the guys from Four Kitchens Company.


I was asked many times how to translate element <Any> in drop-down list in filter of views module. Yes! It can’t be done in a standard way by interface translation.

Need a quote? Let's discuss the project

Are you looking for someone to help you with your Drupal Web Development needs? Let’s get in touch and discuss the requirements of your project. We would love to hear from you.

Join the people who have already subscribed!

Want to be aware of important and interesting things happening? We will inform you about new blog posts on Drupal development, design, QA testing and more, as well news about Drupal events.

No charge. Unsubscribe anytime