# [ Solved ] 192.168.1.21 is not listening.

## CurtE

I've stepped away from Gentoo too long and forgot the basics.  I re-setup a Gentoo server and tried to use WinSCP from my Windows machine but get a connection refused.  It looks like the server is refusing because 192.168.1.21 is not listening.

What do I have to do to get it to listen?Last edited by CurtE on Fri Jul 30, 2010 4:17 am; edited 1 time in total

----------

## Jaglover

Who is 192.168.1.21   :Confused:  Anybody we know?

----------

## CurtE

Intranet address between Windows machine and Linux.  I have two ethernet cards in the machine, one for the static ip and one for local.  192.168.1.21 is ETH1

----------

## Hu

WinSCP is a GUI program to use scp.  scp is transported over ssh.  Are you running an sshd so that ssh can connect?

----------

## CurtE

Yes, I'm running openssh.  It works on my other server but not on this one.

"netstat -an" does not show 192.168.1.21 listening.

----------

## dmpogo

 *CurtE wrote:*   

> Yes, I'm running openssh.  It works on my other server but not on this one.
> 
> "netstat -an" does not show 192.168.1.21 listening.

 

Running it on another server won't help. It needs to run on a machine you are connecting to.

----------

## CurtE

Two separate machines, each with their own configs.

The one method of curing it is to add in /etc/ssh/sshd_config:

Port 22

ListenAddress 192.168.1.21

This seems to have let me get into the system.  I did get a prompt wanting validation that I knew what I was doing (LOL) but now I'm in.

Thanks for the help.

P.S.

The config file originally had Port 22 uncommented but did not have a ListenAddress for the IP.

Commenting Port 22 out without a ListenAddress also seems to work.

Apparently it's an "all or none" situation.

----------

## dmpogo

 *CurtE wrote:*   

> 
> 
> The config file originally had Port 22 uncommented but did not have a ListenAddress for the IP.
> 
> Commenting Port 22 out without a ListenAddress also seems to work.
> ...

 

Typically, one does not need to specify port (22), since 22 is the default.   By default sshd listens on all interfaces (and you have two of them). It seems if  Port 22 specified explicitly,  it is not "default" anymore and sshd binds only to one interface, perhaps the first one. The ListenAddress is needed.

----------

