Re: ssh to a remote server via gateway server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Mon, Jun 2, 2008 at 4:38 PM, Cameron Simpson <cs@xxxxxxxxxx> wrote:
On 02Jun2008 16:23, lux <yuanlux@xxxxxxxxx> wrote:
| > >> 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.
|
| Sounds a  very interesting tool. I gave it a try. But
| what is shqstr?
| looks a like a command, but not in my system

Yeah, sshto shamelessly uses other scripts from that same collection.
Shqstr quotes strings for handing to eval/sh/remote-ssh intact.

The simplest thing is to go to:
and download the tarball, unpack into /opt/css. Source /opt/css/env.sh
to fix up your $PATH (it appends, so as not to preempt any of your
normal commands or libraries). Then retry.

Please let me know if you have further trouble; this stuff is _meant_ to be
usable by people who aren't me:-)

Cheers,

Thanks a lot, I will try it. I followed your hint of ProxyCommand

here is the .ssh/config file:

Host labpc
        ProxyCommand ssh  lux@gw -t -w 3 labpc 22

When

ssh labpc

I got two layers of prompt for login. there were possible outputs:

1st, sometime, I got login to labpc , but it last 1 or 2 seconds, and get discconetctd with this message:Connection to labpc closed by remote host.

the 2nd output is failure to login and got this message:
Write failed: Broken pipe

any suggest? thanks

Y

 
 


--
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

When Microsoft Office is your only hammer, pretty much everything begins to
look like a nail. Or a thumb. - Rob Pegoraro

--

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux