Re: ssh-add won't create indentity file
hoherbe@charlie.cns.iit.edu (Herbert Ho) wrote:
>looking in the man page for ssh-add it states that if the identity
>file doesn't exist, then it would create it. but it doesn't. it keeps
>spitting me a "bad key file" error.
>
>so again, i rashly nuke my .ssh, saving my config this time. =)
>
>and still ssh-add doesn't work. so i try logging out and logging back
>in hoping that it was ssh-agent that was at fault. no luck.
>
>does anyone have any clue what i can do?
How about ssh-keygen?
>also, am i suppose to run ssh-add on the remote server or on my local
>machine?
I run it on the local machine, then ssh seems to be happy.
For reference, the way I normally tell a new account (say cjw44@remote)
that I should be able to log in from my primary box (cjw44@riva) without
a password goes something like this:
* [cjw44@riva ~]$ ssh-add
(if necessary)
* [cjw44@riva ~]$ ssh cjw44@remote
* [cjw44@remote ~]$ ssh cjw44@riva
(this gets riva's host key into remote's .ssh/known_hosts file)
* log back out of both ssh sessions
* [cjw44@riva ~]$ cat .ssh/identity.pub | \
> ssh remote cat \>\> .ssh/authorized_keys
Once I've done that, everything works smoothly.
HTH,
--
Colin Watson [cjw44@cam.ac.uk]
Reply to: