FW: [H-GEN] SSH PROBLEM
Jason Parker-Burlingham
jasonp at uq.net.au
Mon Oct 28 12:33:50 EST 2002
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
Robert Brockway <robert at timetraveller.org> writes:
> telnet to port 22 is an attempt to connect to your ssh port. Telnet
> is a great diagnostic tool.
I would recommend using netcat (aka "nc") where possible; it does
(IMHO) a much better job of connecting to a socket at one and, a file
descriptor at the other, and mediating between the two without the
protocol overhead of telnet; it's also capable of doing a few things
which aren't (as far as I know) possible with telnet[1].
Oh, and it interfaces quite nicely with ssh.
jason
[1] : One of my favorites is to ssh to another host with some port
forwarding on high ports (so superuser access isn't required).
Then, back on the original host, one can run an nc process
connecting to the forwarded port, and use that as input into a
pipe.
A B
ssh to B, port 4444->A:5555
run process X, use nc to pipe
output to localhost:4444
use nc to read from localhost:5555,
and feed into process Y.
I usually find this much less error prone than mucking about
writing an entire script for B on the command-line at A and
finding it didn't work right much later in the process.
--
||----|---|------------|--|-------|------|-----------|-#---|-|--|------||
| ``It's just a big electric typewriter.'' |
| |
||--|--------|--------------|----|-------------|------|---------|-----|-|
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list