PDA

View Full Version : SSH port other than default 22


Quinton
20th November 2006, 23:49
Hi

I am using a different SSH port to the default 22 but with no luck. Although I can connect with the default one.

Does eBox's firewall allow you to specify a different SSH port? I have a feeling that it only allows port 22 for SSH.

Quinton

falko
21st November 2006, 15:49
What's the output of netstat -tap? Is SSH started on the system?

Quinton
22nd November 2006, 00:08
Hi Falko

penguin:~# netstat -tap

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

tcp 0 0 localhost.localdom:ldap *:* LISTEN 24158/slapd

tcp 0 0 penguin.cruc:netbios-ns *:* LISTEN 2805/smbd

tcp 0 0 localhost.lo:netbios-ns *:* LISTEN 2805/smbd

tcp 0 0 penguin.cru:netbios-dgm *:* LISTEN 2805/smbd

tcp 0 0 localhost.l:netbios-dgm *:* LISTEN 2805/smbd

tcp 0 0 penguin.cru:netbios-ssn *:* LISTEN 2805/smbd

tcp 0 0 localhost.l:netbios-ssn *:* LISTEN 2805/smbd

tcp 0 0 *:sunrpc *:* LISTEN 1572/portmap

tcp 0 0 *:ssmtp *:* LISTEN 25282/master

tcp 0 0 *:auth *:* LISTEN 1996/inetd

tcp 0 0 penguin.crucial.:domain *:* LISTEN 20913/named

tcp 0 0 localhost.locald:domain *:* LISTEN 20913/named

tcp 0 0 *:982 *:* LISTEN 2072/rpc.statd

tcp 0 0 *:ipp *:* LISTEN 23163/cupsd

tcp 0 0 *:3128 *:* LISTEN 12205/squid

tcp 0 0 *:postgresql *:* LISTEN 2054/postmaster

tcp 0 0 *:smtp *:* LISTEN 25282/master

tcp 0 0 localhost.localdoma:953 *:* LISTEN 20913/named

tcp 0 0 *:3129 *:* LISTEN 12204/dansguardian

tcp 0 0 *:https *:* LISTEN 2538/apache-perl

tcp 0 0 penguin.cr:microsoft-ds *:* LISTEN 2805/smbd

tcp 0 0 localhost.:microsoft-ds *:* LISTEN 2805/smbd

tcp 0 0 penguin.cru:netbios-ssn 192.168.1.102:3819 ESTABLISHED14574/smbd

tcp 0 0 penguin.crucial.za:3128 192.168.1.10:supfiledbg ESTABLISHED12205/squid

tcp 0 0 penguin.crucial.za:3128 192.168.1.101:1068 ESTABLISHED12205/squid

tcp 0 0 penguin.crucial.z:53780 kr-in-f125.google:https ESTABLISHED12205/squid

tcp 0 0 penguin.crucial.z:53787 c-66-31-111-189.h:https ESTABLISHED12205/squid

tcp6 0 0 *:imaps *:* LISTEN 24119/couriertcpd

tcp6 0 0 *:pop3s *:* LISTEN 24035/couriertcpd

tcp6 0 0 *:imap2 *:* LISTEN 25301/couriertcpd

tcp6 0 0 *:ssmtp *:* LISTEN 25282/master

tcp6 0 0 *:ssh *:* LISTEN 28642/sshd

tcp6 0 0 *:postgresql *:* LISTEN 2054/postmaster

tcp6 0 0 *:smtp *:* LISTEN 25282/master

tcp6 0 0 ip6-localhost:953 *:* LISTEN 20913/named

tcp6 0 0 ::ffff:192.168.1.15:ssh ::ffff:192.168.1.1:daap ESTABLISHED28697/sshd: tubbz [

tcp6 0 0 ::ffff:192.168.1.15:ssh vc-196-207-41-253:45966 ESTABLISHED28675/sshd: tubbz [

penguin:~#


And yes, SSH is started. It works perfect if I leave it as default 22

Thanks Falko

till
22nd November 2006, 11:57
SSH is currently running on port 22, maybe you edited the wrong config file.

Quinton
22nd November 2006, 15:07
hmmmm......

I had to change it to 22 in order to connect to get the output of 'netstat -tap'

FYI, the config file edited was /etc/ssh/sshd_config and I gave ssh a restart after that.

BTW, I notice this only happens on a system where eBox with its firewall is installed.

Quinton

falko
23rd November 2006, 17:24
The eBox firewall assumes port 22 for SSH, so if you use another port you might have problems. You can try to open another port in the eBox firewall, but I'm not sure if te web interface allows you to do it.

Quinton
23rd November 2006, 23:08
Thanks Falko. I'll see if I can find a fix.

Quinton