RE: SSH without inputing password



This works for me on RHEL5:

On the client:

1. Generate a private/public keypair with an empty password:

$ pwd
/home/username

$ ssh-keygen -t dsa

2. Copy the generated public key to the server:

$ scp .ssh/id_dsa.pub username@servername:/home/username


On the server:

1. Rename the public key:

$ mv id_dsa.pub authorized_keys

2. Copy the authorized_keys file to the user's .ssh directory. If the
.ssh directory does not exist, create it and modify its permissions as
follows:

$ mkdir .ssh
$ chown 700 .ssh/

$ mv authorized_keys .ssh/

3. Check that the authorized_keys file has the following permissions:

$ -rw-r--r-- 1 username username 599 Mar 21 10:55 authorized_keys


4. From the client, log on to the server. You should not be prompted
for a password.



-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx
[mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Sanjay Chakraborty
Sent: 21 May 2008 01:11
To: General Red Hat Linux discussion list
Subject: Re: SSH without inputing password

Hi there,
One other thing do not change the permission level for authorized_keys
file
and .ssh key directory.


On Tue, May 20, 2008 at 1:19 PM, aydin sasmaz <sasmaz@xxxxxxxxxx> wrote:

Hi

Have you tried this method before or is suitable for you

1) generating a rsa or dsa key pair o a local host,
2) concatenate id_rsa.pub or id_dsa.pub to the
/root/.ssh/authorized_keys
or
authorized_keys2 file on the remote host

After that you can easily ssh from local to remote host without
password
issue


Regards



-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx [mailto:
redhat-list-bounces@xxxxxxxxxx]
On Behalf Of Daniel Carrillo
Sent: Tuesday, May 20, 2008 5:34 PM
To: General Red Hat Linux discussion list
Subject: Re: SSH without inputing password

2008/5/20 tech user <techwww@xxxxxxxxxxxx>:

But what I wanted is:

1> ssh remote_host
2> input password automatically for me
3> let me login into it successfully and stay there

Do you know me? Thank you.

--Ken


Hi.

You can make a simple perl wrapper using Net::SSH::Perl (see
$ssh->shell).

Cheers.

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list




--

Regards.
Sanjay Chakraborty
--

redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: Explanation of SSH
    ... I am still unclear on how SSH works exactly. ... Client issues SSH command and names server ... "Shopper" says "server sends back its public host and server keys ... Surely there is only one public key it sends ...
    (comp.security.ssh)
  • Public key authentication from F-Secure to OpenSSH?
    ... I'm trying to setup public key authentication from ... an F-Secure SSH client to an OpenSSH server. ... I put the file in the .ssh directory. ...
    (comp.security.ssh)
  • Explanation of SSH
    ... I am still unclear on how SSH works exactly. ... Client issues SSH command and names server ... "Shopper" says "server sends back its public host and server keys ... Surely there is only one public key it sends ...
    (comp.security.ssh)
  • SSH with Public Key Authentication (Was: Re: Attention: Giorgos Keramidas (Was: CVS Import Permissio
    ... I know that the setting of CVSUMASK on the server machine> works if you use SSH tunneling though. ... I have tried using SSH in the past, and got stuck setting up the public key login. ... In order to use cvs with ssh, we must use public key authentication. ...
    (freebsd-questions)
  • Re: ssh
    ... ssh can use DSA or RSA keys for authentication. ... public key can decrypt. ... is significantly smaller than that for ssh RSA/DSA keypairs. ... host to capture the key (either an unprotected key or a capture of your ...
    (Vuln-Dev)