Toggle navigation
Koozali.org: home of the SME Server
Community
Forums
Bugs
Lists
Forum Help
Download
SME Server ISOs
Contribs
Documentation
Manual
Wiki
FAQ
HowTo
Donate
Search
Login
Register
Login
Register
×
Close
Login
Remember me
Koozali.org: home of the SME Server
Legacy Forums
Experienced User Forum
Topic:
ssh and keys
« previous
next »
+
Print
Pages: [
1
]
Go Down
ssh and keys
2 Replies
533 Views
Kees Vonk
ssh and keys
«
on:
December 24, 2003, 07:14:29 AM »
I am trying to setup my e-smith server so I can log in using ssh and keys, so I can run a backup script from cron on a remote machine without having to type in a password. On the remote machine (SuSE 8.2) I have create the keys using ssh-keygen (ssh-keygen -t rsa) and that has create two files:
~/.ssh/identity
~/.ssh/identity.pub
and I copied the .pub file to /root/.ssh/authorized_keys on the e-smith machine. However I still get prompted for a password when I try to do connect to the e-smith machine. Can anyone tell me if I am forgetting something.
Kees
Logged
Per Sørensen
Re: ssh and keys
«
Reply #1 on:
December 24, 2003, 03:20:43 PM »
Found this howto on the net somewhere. I use it myself, works well:
Here's the technique in a nutshell (just tried it out on 3 esmith servers):
Let's say that you're working on server 10.0.0.20 and you want to ssh to server 10.0.0.30 without having to use a password.
On 10.0.0.20, issue the following command as root: # ssh-keygen -t rsa
This will prompt you for a location to store the key (use the default) and for a passphrase (leave blank).
Next, use scp (secure copy) to move the key to 10.0.0.30 # scp .ssh/id_rsa.pub 10.0.0.30:/root/.ssh/authorized_keys2 This will prompt you for the root password on 10.0.0.30 and will then transfer the key from 10.0.0.20 to 10.0.0.30. It should do the trick.
Try it out by running an ssh session from the command line:# ssh 10.0.0.30 It should let you in without a password. You can scp the ".ssh/id_rsa.pub" file to other servers without having to create a public key for each.
Per
[%sig%]
Logged
Kees Vonk
Re: ssh and keys
«
Reply #2 on:
January 05, 2004, 10:10:30 AM »
Excelent, thank you very much, the difference with what I was doing was the '2' behind authorized_keys, I did not notice that in the ssh man page, but it seems to have solved the problems.
Thank you very much,
Kees
Logged
+
Print
Pages: [
1
]
Go Up
« previous
next »
Koozali.org: home of the SME Server
Legacy Forums
Experienced User Forum
Topic:
ssh and keys