This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: trouble logging in over ssh with a key


On 4/12/2012 12:50 PM, fREW Schmidt wrote:
> I'm trying to set up my server to allow key-based authentication and
> am not having any luck.  I initially created the key on the windows
> box with ssh-user-config.  Then I copied the private key (I know,
> that's not how you are supposed to do it, but I was worried that on
> cygwin it needed to do some extra special steps) to my desktop.  Now I
> have the following in my .ssh/config:
> 
> host fl
>      user Administrator
>      hostname FrewLynx
>      port 22
>      identityfile ~/.ssh/id_rsa2
> 
> so when I do ssh fl it should expand to Administrator@FrewLynx with
> the correct key.

That configuration stanza expects to find your private key in

   ~/.ssh/id_rsa2

but you said you copied it to your desktop. Did you *move* it to your
Windows desktop, so it is no longer in ~/.ssh/id_rsa2?

> Here is the log from ssh -vvv fl
> 
> OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011
[snip]
> debug2: key: /home/frew/.ssh/keys/frewlynx.rsa ((nil))

It's trying to use ~/.ssh/keys/frewlynx.rsa as the key. Is there more in
your ~/.ssh/config file that specifies this? Or maybe in
/etc/ssh_config? Maybe a "Host *" stanza somewhere before your "Host f1"
stanza?

> Can anyone help me out and tell me what I need to change?

You can get the ~/.ssh/config file out of the way to see if you can get
this to work:

$ SSH_AUTH_SOCK= ssh -F /dev/null -i ~/.ssh/id_rsa2 \
  Administrator@FrewLynx

If that works, the problem is in your ~/.ssh/config (or possible
/etc/ssh_config). If that doesn't work, check the -vvv output again to
see which key it's trying to use.

-- 
David Rothenberger  ----  daveroth@acm.org

"Wish not to seem, but to be, the best."
                -- Aeschylus

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]