Networking Forums

Networking Forums > Computer Networking > Linux Networking > Auto login with ssh

Reply
Thread Tools Display Modes

Auto login with ssh

 
 
Ivan
Guest
Posts: n/a

 
      10-09-2003, 09:29 AM
Hi all,

I am now working with two servers which has to be synchronized with
each other. I want to use the rsync function and do the
synchronization over SSH.

But it seems to me that I cannot login to the other machine
automatically, everytime it prompts me for a password. My goal is that
the primary server can automatically login the backup server and
transfer files to the back up server by SSH so that synchronization
can be done.

I have read quite a number of web pages teaching how to use RSA key to
configure the SSH, but it really seems not working fine.

Thanks for everyone who can give me some advice.

Ivan

P.S. the primary server is running with Redhat 8.0 while the backup
server is running with Redhat 7.3, they are connected via a crossover
cable.
 
Reply With Quote
 
 
 
 
Markus Hosch
Guest
Posts: n/a

 
      10-09-2003, 09:53 AM
Ivan wrote:
> Hi all,
>
> I am now working with two servers which has to be synchronized with
> each other. I want to use the rsync function and do the
> synchronization over SSH.
> [snip]
> I have read quite a number of web pages teaching how to use RSA key to
> configure the SSH, but it really seems not working fine.
>
> Thanks for everyone who can give me some advice.


Ok, here it goes:

generate a key by issuing

ssh-keygen -t <desired-type> -b <bits> see man ssh-keygen

now you have two files, one with the private key and one which contains
the public key. It's called .ssh/id_rsa.pub or id_dsa.pub . This is the
key you have to transfer to the server (e.g. via scp) and add ith to the
file .ssh/authorized_keys. Be sure that this file is only rwx by the
user and no one else. Now you should be able to log on via public key
authorization. And don't specify a passphrase for your private key

Greets
Markus

 
Reply With Quote
 
Stuart H
Guest
Posts: n/a

 
      10-09-2003, 06:22 PM
On Thu, 09 Oct 2003 02:29:46 -0700, Ivan wrote:

> Hi all,
>
> I am now working with two servers which has to be synchronized with
> each other. I want to use the rsync function and do the
> synchronization over SSH.
>
> But it seems to me that I cannot login to the other machine
> automatically, everytime it prompts me for a password. My goal is that
> the primary server can automatically login the backup server and
> transfer files to the back up server by SSH so that synchronization
> can be done.
>
> I have read quite a number of web pages teaching how to use RSA key to
> configure the SSH, but it really seems not working fine.
>
> Thanks for everyone who can give me some advice.
>
> Ivan
>
> P.S. the primary server is running with Redhat 8.0 while the backup
> server is running with Redhat 7.3, they are connected via a crossover
> cable.


http://people.enginesofcreation.ie/m...es/000230.html
 
Reply With Quote
 
Mattias Honrendgard
Guest
Posts: n/a

 
      10-09-2003, 10:05 PM
(E-Mail Removed) (Ivan) wrote in message news:<(E-Mail Removed) om>...
> Hi all,

[snip]
>
> I have read quite a number of web pages teaching how to use RSA key to
> configure the SSH, but it really seems not working fine.
>


http://nick.luckcuck.org.uk/docs/lin...ple-HOWTO.html

Perhaps if you could explain exactly what steps you are taking, we can
be of greater help?
 
Reply With Quote
 
Ivan
Guest
Posts: n/a

 
      10-10-2003, 03:32 AM
(E-Mail Removed) (Mattias Honrendgard) wrote in message news:<(E-Mail Removed). com>...
> (E-Mail Removed) (Ivan) wrote in message news:<(E-Mail Removed) om>...
> > Hi all,

> [snip]
> >
> > I have read quite a number of web pages teaching how to use RSA key to
> > configure the SSH, but it really seems not working fine.
> >

>
> http://nick.luckcuck.org.uk/docs/lin...ple-HOWTO.html
>
> Perhaps if you could explain exactly what steps you are taking, we can
> be of greater help?



I have followed most of the instructions of some web site teaching
this topic but still failed to achieve what I want.

What I have done is as follow:
1. in local: generate key pair by "ssh-keygen -t rsa1",
2. transfer the identity.pub to the server
3. append the identity.pub to authorized_key file in the server
4. change the permission of authorized_key to 644

then when I ssh to the remote from local host, it requires me to enter
password which is not what I want.

Then I modified the /etc/ssh/sshd_config file in the server by
changing as:
PasswordAuthenticatin no

but when I ssh to the remote from local host again, it said"
Permission denied: (publickey, keyboard-interactive)

what else should I do to login without password prompt?

Thx

Ivan
 
Reply With Quote
 
Walter Schiessberg
Guest
Posts: n/a

 
      10-10-2003, 07:05 AM
Ivan wrote on 10.10.2003 05:32:


[SSH problems]
> I have followed most of the instructions of some web site teaching
> this topic but still failed to achieve what I want.
>
> What I have done is as follow:
> 1. in local: generate key pair by "ssh-keygen -t rsa1",
> 2. transfer the identity.pub to the server
> 3. append the identity.pub to authorized_key file in the server
> 4. change the permission of authorized_key to 644
>
> then when I ssh to the remote from local host, it requires me to enter
> password which is not what I want.
>


You shure you using RSA authentication?
Try generating the DSA key.
See <http://vh224401.truman.edu/~dbindner/guide/a1903.html>
And make also shure that the .ssh directory is set to 700.

Cheers

Walter

 
Reply With Quote
 
Neil Horman
Guest
Posts: n/a

 
      10-10-2003, 11:37 AM
Ivan wrote:
> (E-Mail Removed) (Mattias Honrendgard) wrote in message news:<(E-Mail Removed). com>...
>
>>(E-Mail Removed) (Ivan) wrote in message news:<(E-Mail Removed) om>...
>>
>>>Hi all,

>>
>> [snip]
>>
>>>I have read quite a number of web pages teaching how to use RSA key to
>>>configure the SSH, but it really seems not working fine.
>>>

>>
>>http://nick.luckcuck.org.uk/docs/lin...ple-HOWTO.html
>>
>>Perhaps if you could explain exactly what steps you are taking, we can
>>be of greater help?

>
>
>
> I have followed most of the instructions of some web site teaching
> this topic but still failed to achieve what I want.
>
> What I have done is as follow:
> 1. in local: generate key pair by "ssh-keygen -t rsa1",
> 2. transfer the identity.pub to the server
> 3. append the identity.pub to authorized_key file in the server
> 4. change the permission of authorized_key to 644
>
> then when I ssh to the remote from local host, it requires me to enter
> password which is not what I want.
>
> Then I modified the /etc/ssh/sshd_config file in the server by
> changing as:
> PasswordAuthenticatin no
>
> but when I ssh to the remote from local host again, it said"
> Permission denied: (publickey, keyboard-interactive)
>
> what else should I do to login without password prompt?
>
> Thx
>
> Ivan

I think what you are actually looking for is HostBasedAuthentication.
Take a look at the sshd man page or google it, and you will find
instructions on how to set this up. You also need to make sure that
when you run ssh-keygen to generate your keys, that you just press enter
whenever it prompts you to enter a password. If you don't, ssh will
prompt you to enter it regardless of your configuration.

HTH
Neil

--
/************************************************** *
*Neil Horman
*Software Engineer
*Red Hat, Inc., www.redhat.com
*gpg keyid: 1024D / 0x92A74FA1
*http://www.keyserver.net
************************************************** */

 
Reply With Quote
 
Mattias Honrendgard
Guest
Posts: n/a

 
      10-11-2003, 08:52 AM
(E-Mail Removed) (Ivan) wrote in message news:<(E-Mail Removed). com>...
> (E-Mail Removed) (Mattias Honrendgard) wrote in message news:<(E-Mail Removed). com>...
> > (E-Mail Removed) (Ivan) wrote in message news:<(E-Mail Removed) om>...
> > > Hi all,

> [snip]
> > >
> > > I have read quite a number of web pages teaching how to use RSA key to
> > > configure the SSH, but it really seems not working fine.
> > >

> >
> > http://nick.luckcuck.org.uk/docs/lin...ple-HOWTO.html
> >
> > Perhaps if you could explain exactly what steps you are taking, we can
> > be of greater help?

>
>
> I have followed most of the instructions of some web site teaching
> this topic but still failed to achieve what I want.
>
> What I have done is as follow:
> 1. in local: generate key pair by "ssh-keygen -t rsa1",
> 2. transfer the identity.pub to the server
> 3. append the identity.pub to authorized_key file in the server
> 4. change the permission of authorized_key to 644
>
> then when I ssh to the remote from local host, it requires me to enter
> password which is not what I want.
>
> Then I modified the /etc/ssh/sshd_config file in the server by
> changing as:
> PasswordAuthenticatin no
>
> but when I ssh to the remote from local host again, it said"
> Permission denied: (publickey, keyboard-interactive)
>
> what else should I do to login without password prompt?


Well, straight off the filenames look funny. Thats the one thing that
tends to get me when I haven't set up auto login with ssh for a while
- is it authorized_keys or authorised_keys2 for rsa? Either way you
don't have the "s" on the end.

Found a much better walk through:

http://ist.uwaterloo.ca/~swball/sshkeys.html
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Shipping Auto Shipping Scheduling:car moving auto transport linkswanted Wireless Internet 0 02-16-2008 01:40 AM
Auto-Login =?Utf-8?B?d3J5dGF0?= Windows Networking 4 08-19-2005 01:43 PM
How to login with native IPASS Login string into netvigator login? Erhard Broadband 0 12-01-2004 06:24 AM
auto-crossover - auto-MDI/X capability of ethernet NIC ttsp Linux Networking 3 03-04-2004 03:33 AM
Auto Login after power failure sharad Windows Networking 5 02-16-2004 02:54 PM



1 2 3 4 5 6 7 8 9 10 11