Hi,
I routinely login a remote server via a 'gateway' machine. For example, I need to login to PC B using ssh. But this PC B is behind a firewall.ssh port on PC A is open.
As a result, I have to login* PC A via ssh, then ssh PC B from PC A.
Is there ssh command line option that I can directly ssh to PC B?
Thanks
Y
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
05-29-2008, 12:52 PM
"Mikkel L. Ellertson"
ssh to a remote server via gateway server
lux wrote:
Hi,
I routinely login a remote server via a 'gateway' machine. For example,
I need to login to PC B using ssh. But this PC B is behind a
firewall.ssh port on PC A is open.
As a result, I have to login PC A via ssh, then ssh PC B from PC A.
Is there ssh command line option that I can directly ssh to PC B?
Thanks
Y
You could try something like:
ssh [options] user@A "ssh [options] user@B"
You can skip the user@ part if you have the same user name.
ssh -Y PC_A "ssh -Y frank@PC_B"
Mikkel
--
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
05-30-2008, 05:52 AM
lux
ssh to a remote server via gateway server
On Fri, May 30, 2008 at 5:24 AM, François Patte <francois.patte@math-info.univ-paris5.fr> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le 29.05.2008 14:11, lux a écrit :
| Hi,
| I routinely login a remote server via a 'gateway' machine. For example,
| I need to login to PC B using ssh. But this PC B is behind a
| firewall.ssh port on PC A is open.
|
| As a result, I have to login *PC A via ssh, then ssh PC B from PC A.
|
| Is there ssh command line option that I can directly ssh to PC B?
I think that you have to make some firewall rules on your gw to allow
NAT to PC B
I don't have control on the gw for NAT .
*
I'm not sure that Mikkel's solution will work:
"Pseudo-terminal will not be allocated because stdin is not a terminal"
will be the error message.
Yes, I got the same error, as
Pseudo-terminal will not be allocated because stdin is not a terminal.
Host key verification failed.
*
- --
François Patte
UFR de mathématiques et informatique
Université Paris Descartes
45, rue des Saints Pères
F-75270 Paris Cedex 06
Tél. +33 (0)1 44 55 35 61
http://www.math-info.univ-paris5.fr/~patte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
05-30-2008, 01:31 PM
"Mikkel L. Ellertson"
ssh to a remote server via gateway server
lux wrote:
I'm not sure that Mikkel's solution will work:
"Pseudo-terminal will not be allocated because stdin is not a terminal"
will be the error message.
You can try adding the -t option to the command to run on PC A.
Mikkel
--
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
05-30-2008, 10:03 PM
Cameron Simpson
ssh to a remote server via gateway server
On 30May2008 08:31, Mikkel L. Ellertson <mikkel@infinity-ltd.com> wrote:
> lux wrote:
>> I'm not sure that Mikkel's solution will work:
>> "Pseudo-terminal will not be allocated because stdin is not a terminal"
>> will be the error message.
>>
> You can try adding the -t option to the command to run on PC A.
I missed the start of this thread, but you can use the ProxyCommand ssh
option to hop through multiple servers, keeping the "top level" ssh
nicely connected to your terminal and the endpoint (via the proxycommand
tunnel). Which may solve the -t option issue.
I have a script called "sshto" that does exactly this for multihop ssh
connections. Very handy, especially since you can make "sshto" the
default transport for rsync, letting you do multihop rsyncs easily:
rsync some-dir/ host1!host2!host3:some-other-dir/
(You will need the ! on the command prompt line instead of plain ! to
avoid your shell's history substitution syntax - a shell script does
not need the annoying sloshes).
Our job is to make the questions so painful that the only way to make the
pain go away is by thinking. - Fred Friendly
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
05-31-2008, 12:14 AM
"Mikkel L. Ellertson"
ssh to a remote server via gateway server
Cameron Simpson wrote:
On 30May2008 08:31, Mikkel L. Ellertson <mikkel@infinity-ltd.com> wrote:
lux wrote:
I'm not sure that Mikkel's solution will work:
"Pseudo-terminal will not be allocated because stdin is not a terminal"
will be the error message.
You can try adding the -t option to the command to run on PC A.
I missed the start of this thread, but you can use the ProxyCommand ssh
option to hop through multiple servers, keeping the "top level" ssh
nicely connected to your terminal and the endpoint (via the proxycommand
tunnel). Which may solve the -t option issue.
I have a script called "sshto" that does exactly this for multihop ssh
connections. Very handy, especially since you can make "sshto" the
default transport for rsync, letting you do multihop rsyncs easily:
rsync some-dir/ host1!host2!host3:some-other-dir/
(You will need the ! on the command prompt line instead of plain ! to
avoid your shell's history substitution syntax - a shell script does
not need the annoying sloshes).
Cheers,
It sounds like you have experience with what he is trying to do, so
please continue to advice the OP. What he is does now is ssh to PC
A, and then ssh to PC B. What he wants to ssh to PC B in one
command, but he has to go through PC A. (firewall machine?)
Mikkel
--
Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
05-31-2008, 03:57 AM
Cameron Simpson
ssh to a remote server via gateway server
On 30May2008 19:14, Mikkel L. Ellertson <mikkel@infinity-ltd.com> wrote:
> Cameron Simpson wrote:
>> I missed the start of this thread, but you can use the ProxyCommand ssh
>> option to hop through multiple servers, keeping the "top level" ssh
>> nicely connected to your terminal and the endpoint (via the proxycommand
>> tunnel). Which may solve the -t option issue.
>>
>> I have a script called "sshto" that does exactly this for multihop ssh
>> connections. Very handy, especially since you can make "sshto" the
>> default transport for rsync, letting you do multihop rsyncs easily:
>>
>> rsync some-dir/ host1!host2!host3:some-other-dir/
>
> It sounds like you have experience with what he is trying to do, so
> please continue to advice the OP. What he is does now is ssh to PC A, and
> then ssh to PC B. What he wants to ssh to PC B in one command, but he has
> to go through PC A. (firewall machine?)
Then he definitely wants sshto:
http://www.cskk.ezoshosting.com/cs/css/bin/sshto
Conveniently, it can make use of an sshtorc file that maps "name" into an
arbitrary "name1!name2!name3!..." ssh hop path. I routiney get only
certain hosts as "sshto foo" where "foo" designates a multihop ssh path.
My motto is, 'Do it my way or watch your butt.' - Nathan Arizona
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
05-31-2008, 03:58 AM
Cameron Simpson
ssh to a remote server via gateway server
On 31May2008 13:57, I wrote:
| Conveniently, it can make use of an sshtorc file that maps "name" into an
| arbitrary "name1!name2!name3!..." ssh hop path. I routiney get only
| certain hosts as "sshto foo" where "foo" designates a multihop ssh path.
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
05-31-2008, 04:28 AM
"Patrick O'Callaghan"
ssh to a remote server via gateway server
On Sat, 2008-05-31 at 13:58 +1000, Cameron Simpson wrote:
> On 31May2008 13:57, I wrote:
> | Conveniently, it can make use of an sshtorc file that maps "name" into an
> | arbitrary "name1!name2!name3!..." ssh hop path. I routiney get only
> | certain hosts as "sshto foo" where "foo" designates a multihop ssh path.
>
> s/only/onto/
>
> Whoops.
s/Whoops/Oops/
:-)
poc
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
06-02-2008, 06:23 AM
lux
ssh to a remote server via gateway server
On Sat, May 31, 2008 at 1:57 PM, Cameron Simpson <cs@zip.com.au> wrote:
On 30May2008 19:14, Mikkel L. Ellertson <mikkel@infinity-ltd.com> wrote:
> Cameron Simpson wrote:
>> I missed the start of this thread, but you can use the ProxyCommand ssh
>> option to hop through multiple servers, keeping the "top level" ssh
>> nicely connected to your terminal and the endpoint (via the proxycommand
>> tunnel). Which may solve the -t option issue.
>>
>> I have a script called "sshto" that does exactly this for multihop ssh
>> connections. Very handy, especially since you can make "sshto" the
>> default transport for rsync, letting you do multihop rsyncs easily: