[NBLUG/talk] OpenSSH2 with public key (no password)

Mark Street jet at sonic.net
Fri Jul 11 12:45:01 PDT 2003


On Friday 11 July 2003 10:53, Bob Blick wrote:
> Basically I'm trying to use scp or scftp in batch mode, so I must first
> have the two machines set up to do ssh without a password. Note that this
> is two linux boxes that ssh fine using a password. Client is behind an NAT
> firewall.
>
> The docs I've read say to generate a key pair on the client, which I have,
> copy the public key to host as ~/.ssh/authorized_keys2 and then bingo it
> should work. However it doesn't. Tried both rsa and dsa.

I like the SSH with KEYS HOWTO ... probably found at linuxdoc.org or google'd.

THESE ARE SSH1 techniques, for SSH2 you need to copy id_dsa.pub over to the 
REMOTEHOST and append it to ~/.ssh/authorized_keys2

ssh-keygen - generate a keypair with NO passwd

yep, scp ~/.ssh/identity.pub REMOTEHOST:./identity.pub

then ssh to the remote host and run.

cat identity.pub >> ~/.ssh/authorized_keys

If you did not type in a password when you generated the identity you should 
now be able to login from your client to the REMOTEHOST without a prompt or 
passwd.

ssh joe at REMOTEHOST

BOOM
$

>
> Also read somewhere I need to have ssh-agent running. Tried that on the
> client but got no help from the "documentation" so it's likely it needs
> some config file to work properly. I have a feeling this is where the real
> trouble is, since I do not normally have this service running on the
> client and the host machine is not mine and does not have this service
> running either.
>
> Also read somewhere I need to do it completely differently, create a .ssh2
> directory and a file within called autorization with the line "key
> public_key_name" and do something complementary on the client. No
> satisfaction there.
>
> OK, help please.
>
> Thanks,
>
> Bob
>
>
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/mailman/listinfo/talk

-- 
Mark Street, D.C.
Red Hat Certified Engineer
Cert# 807302251406074
--
Key fingerprint = 3949 39E4 6317 7C3C 023E  2B1F 6FB3 06E7 D109 56C0
GPG key http://www.streetchiro.com/pubkey.asc




More information about the talk mailing list