ssh tunnel problems

Tim ignored_mailbox at yahoo.com.au
Sat Jun 21 17:25:41 UTC 2008


On Sat, 2008-06-21 at 10:22 -0400, Rick Bilonick wrote:
> [chippy at localhost ~]$ ssh server at localhost -p 5000 -v
> OpenSSH_4.7p1, OpenSSL 0.9.8b 04 May 2006
> debug1: Reading configuration data /etc/ssh/ssh_config
> debug1: Applying options for *
> debug1: Connecting to localhost [127.0.0.1] port 5000.
> debug1: connect to address 127.0.0.1 port 5000: Connection refused
> ssh: connect to host localhost port 5000: Connection refused
> 
> I'm using "localhost" because I was following an example. I guess I
> could substitute an IP for localhost. Isn't "localhost" just another
> name for the local computer? So on the first use of ssh, localhost
> refers to the server and on the second use of ssh, it refers to the
> home computer. At least, that's what I believe.

"localhost" is how a computer refers to itself.  Just the same as a
group of people in a room will all think of themselves as "myself" or
"I".  While correct, they could only ever converse about themselves, not
anyone else in the room.  Trying to network between different computers
all going by the same hostname is going to twist your brain around in
circles.

If you do try "ssh server at localhost" you're going to try and connect to
the SSH daemon on the same machine that you're typing on, which may or
may not actually connect.  But you're certainly not going to connect to
another machine, using that address.

If you don't have unique hostnames that are resolveable on your LAN
(i.e. everyone knows the name and IP of *all* hosts on the LAN), then
use numerical IP addresses.

Again, don't fall down the "looking in the mirror" trap by trying to
connect to 127.0.0.1.  That's the numerical address for a machine to
refer to itself.

You're playing with the local loopback device.  127.0.0.1 is the
traditional IP address for it, and localhost is the traditional hostname
for it.

-- 
[tim at localhost ~]$ uname -r
2.6.25.6-55.fc9.i686

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.






More information about the fedora-list mailing list