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

Re: ssh tunnel problems

On Sat, 2008-06-21 at 10:22 -0400, Rick Bilonick wrote:
> [chippy localhost ~]$ ssh server 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 [] port 5000.
> debug1: connect to address 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

If you do try "ssh server 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  That's the numerical address for a machine to
refer to itself.

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

[tim localhost ~]$ uname -r

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

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