• Breaking News

    SSH login without password

    Here you have a very common request:

    You want to use Linux and OpenSSH to automate your tasks and you don't want to enter any passwords at all.

    Let's say you want to compare two filesystems on different servers, and you want to call ssh within a shell script.


    How to do it?

    First, log in the source server and generate a pair of authentication keys. Do not enter a passphrase:


    
    ssh-keygen -t rsa
    Generating public/private rsa key pair.
    Enter file in which to save the key ...
    
    

    Grab the content of "id_rsa.pub" file and copy into "authorized_keys" file located in the ".ssh" subdirectory of the target user ID home directory.

    Now, just log into the target host.

    Don't worry if the authenticity of the target host can't be established, just answer "YES" when prompted.

    No comments