public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* ssh tunneling and keys - how to...
@ 2012-09-04 12:34 Miguel A. Gonzalez-Sanchez
  2012-09-04 13:10 ` Brian Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Miguel A. Gonzalez-Sanchez @ 2012-09-04 12:34 UTC (permalink / raw)
  To: cygwin

I need to ssh to a server and from there jump to another server.

I created a public key and gave it to the administrator to install it on their side.


I successfully connect to the first server but once in there, I cannot 
connect to the next server, I always get 'Permission denied'. 


My colleagues on Mac or Linux have not issues. Can I do this with CygWin or should I use something different?

I've been told that I need to do something else on CygWin so this carry on the public key... Is this the case?


Thanks.

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ssh tunneling and keys - how to...
  2012-09-04 12:34 ssh tunneling and keys - how to Miguel A. Gonzalez-Sanchez
@ 2012-09-04 13:10 ` Brian Wilson
  2012-09-04 13:50   ` Antoniette
  0 siblings, 1 reply; 5+ messages in thread
From: Brian Wilson @ 2012-09-04 13:10 UTC (permalink / raw)
  To: cygwin

You have your local computer connected to a second computer and want to go fro 
the second machine to a third machine (if I understand this).  The connection 
from the local machine to the second machine works; but the connection from 
the second to the third does not work.

You need to set up an ssh key from the second server to the third server.  
Generate the public/private key on the second server and move the public key 
to the third server's .ssh directory (and check the directory and file 
permissions are correct).  You can't set up keys for all machines from the 
local machine only.  I hope this helps.

Sincerely,

Brian S. Wilson

---------- Original Message -----------
> I need to ssh to a server and from there jump to another server.
> 
> I created a public key and gave it to the administrator to install 
> it on their side.
> 
> I successfully connect to the first server but once in there, I 
> cannot connect to the next server, I always get 'Permission denied'.
> 
> My colleagues on Mac or Linux have not issues. Can I do this with 
> CygWin or should I use something different?
> 
> I've been told that I need to do something else on CygWin so this 
> carry on the public key... Is this the case?
> 
> Thanks.
------- End of Original Message -------

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ssh tunneling and keys - how to...
  2012-09-04 13:10 ` Brian Wilson
@ 2012-09-04 13:50   ` Antoniette
  2012-09-04 14:33     ` Antoniette
  0 siblings, 1 reply; 5+ messages in thread
From: Antoniette @ 2012-09-04 13:50 UTC (permalink / raw)
  To: cygwin

Brian Wilson <wilson <at> ds.net> writes:

> 
> You have your local computer connected to a second computer and want to go fro 
> the second machine to a third machine (if I understand this).  The connection 
> from the local machine to the second machine works; but the connection from 
> the second to the third does not work.
> 
> You need to set up an ssh key from the second server to the third server.  
> Generate the public/private key on the second server and move the public key 
> to the third server's .ssh directory (and check the directory and file 
> permissions are correct).  You can't set up keys for all machines from the 
> local machine only.  I hope this helps.
> 
> Sincerely,
> 
> Brian S. Wilson
> 
> ---------- Original Message -----------
> > I need to ssh to a server and from there jump to another server.
> > 
> > I created a public key and gave it to the administrator to install 
> > it on their side.
> > 
> > I successfully connect to the first server but once in there, I 
> > cannot connect to the next server, I always get 'Permission denied'.
> > 
> > My colleagues on Mac or Linux have not issues. Can I do this with 
> > CygWin or should I use something different?
> > 
> > I've been told that I need to do something else on CygWin so this 
> > carry on the public key... Is this the case?
> > 
> > Thanks.
> ------- End of Original Message -------
> 
> 


Hi Brian and thanks for your answer.

Yes, that's what I want to do, from my local machine connect to a remote server,
once I open a session on that server, then connect to another server.

The thing is that when I do this from a Linux machine, it works fine.

I do not connect using my own user name but a special user name with read
privileges that the administrators of those servers have created, imagine that
the remote servers have created a user such as 'readonlyuser' with password
'simplepassword', that the first server is 'firstserver' and that the second
server is 'secondserver', then I connect as...

ssh readonlyuser@firstserver 
(when asked for the password we input 'simplepassword'

Now I'm connected to firstserver and from there I do...

ssh readonlyuser@secondserver 
(when asked for the password I input 'simplepassword'

This last part is the one I cannot get working, I don't know if I am making
sense here but it works from a Linux machine.

Any ideas? 


--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ssh tunneling and keys - how to...
  2012-09-04 13:50   ` Antoniette
@ 2012-09-04 14:33     ` Antoniette
  2012-09-04 16:11       ` Antoniette
  0 siblings, 1 reply; 5+ messages in thread
From: Antoniette @ 2012-09-04 14:33 UTC (permalink / raw)
  To: cygwin

Now, from my local machine before connecting to the first server, 
I do ssh-add which adds my identity. Then I connect to the first 
remote server fine but still fails to connect to the second 
remote server.




--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ssh tunneling and keys - how to...
  2012-09-04 14:33     ` Antoniette
@ 2012-09-04 16:11       ` Antoniette
  0 siblings, 0 replies; 5+ messages in thread
From: Antoniette @ 2012-09-04 16:11 UTC (permalink / raw)
  To: cygwin

Solved.

I needed to force some parameters to make it work.

Connect to the first server...

ssh -A -2 readonlyuser@firstserver -i ".ssh/id_rsa" (path to your private key)

...now connect to the second server...

ssh readonlyuser@secondserver


--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-04 16:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-04 12:34 ssh tunneling and keys - how to Miguel A. Gonzalez-Sanchez
2012-09-04 13:10 ` Brian Wilson
2012-09-04 13:50   ` Antoniette
2012-09-04 14:33     ` Antoniette
2012-09-04 16:11       ` Antoniette

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).