SSH port other than default 22

Discussion in 'HOWTO-Related Questions' started by Quinton, Nov 20, 2006.

  1. Quinton

    Quinton New Member

    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
     
  2. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    netstat -tap
    ? Is SSH started on the system?
     
  3. Quinton

    Quinton New Member

    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
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    SSH is currently running on port 22, maybe you edited the wrong config file.
     
  5. Quinton

    Quinton New Member

    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
     
    Last edited: Nov 22, 2006
  6. falko

    falko Super Moderator ISPConfig Developer

    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.
     
  7. Quinton

    Quinton New Member

    Thanks Falko. I'll see if I can find a fix.

    Quinton
     

Share This Page