Non standard ports for SSH

Discussion in 'Water Cooler' started by Michael, Oct 27, 2009.

  1. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    Does anyone know what ports I could use which are non standard for SSH, I dont want to use a port which is needed for something else.

    Thank you.

    Apologies if this isnt the right forum for this.

    Also, I would like to know what I need to do within sshd_config to turn off SSHv1, I have this currently:

    #Protocol 2

    But apparently it still is turned on :D
     
  2. kev

    kev Regular Member

    Joined:
    Mar 9, 2009
    Messages:
    1,224
    Likes Received:
    61
    Try port 666 - its supposed to be reserved for Doom (the computer game).

    A lot of computer games use port 27015 - such as left 4 dead. That way people doing port scans will think your running a game server instead of an SSH server.
     
    2 people like this.
  3. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    Thanks Kevin, I think Ill just request our host to do it to a random non standard one since it is managed after all :D I still however want to disable SSHv1 myself so if anyone has any ideas let me know please.
     
  4. David

    David Regular Member

    Joined:
    May 30, 2003
    Messages:
    1,088
    Likes Received:
    133
    Location:
    Australia
    Just have them disable it when they're changing your port. I think its done in the same place (ssh_config/sshd_config)
     
  5. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    I will to save the hassle, im sure my own edit should have got it working but seemingly it hasnt.
     
  6. David

    David Regular Member

    Joined:
    May 30, 2003
    Messages:
    1,088
    Likes Received:
    133
    Location:
    Australia
    Remember any time you edit something in nix environment, you have to restart the service for the change to take effect.
     
    2 people like this.
  7. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    So a restart of Apache is needed! Thanks for the help :D
     
  8. David

    David Regular Member

    Joined:
    May 30, 2003
    Messages:
    1,088
    Likes Received:
    133
    Location:
    Australia
    If apache controls your SSH then its needed.

    But that'd be one messed up server

    You'll need to restart SSH service For example:

    Code:
    service sshd restart
    
     
  9. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    Thanks I will try that now and see how it goes!
     
  10. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    It didnt seem to correct the problem with SSHv1 being enabled :shrug: do you happen to have any links to any server commands resources, im interested in prepping myself for when we need a dedi :D
     
  11. David

    David Regular Member

    Joined:
    May 30, 2003
    Messages:
    1,088
    Likes Received:
    133
    Location:
    Australia
    I'm confused :???:, can you tell me what you're trying to do again :D
     
  12. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    Disable SSHv1 within sshd_config :D
     
  13. David

    David Regular Member

    Joined:
    May 30, 2003
    Messages:
    1,088
    Likes Received:
    133
    Location:
    Australia
    Login as root
    Run the following two commands
    Code:
    echo "Protocol 2" >> /etc/ssh/sshd_config
    service sshd restart
    
    Should do the trick.

    Edit:

    If that doesn't work.

    1. Login as root
    2. locate the sshd_config file
    3. Edit the file and remove any thing that has " Protocol X" (X will most likely be 1)
    4. At end of file add " Protocol 2" (without quotes)
    5. Restart SSH
     
  14. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    The first worked a treat, thank you! I also need to disable XFS too, ive tried:

    service xfs stop
    chkconfig xfs off

    Without luck so far :D
     
  15. David

    David Regular Member

    Joined:
    May 30, 2003
    Messages:
    1,088
    Likes Received:
    133
    Location:
    Australia
    Go into your WHM and under Security run "Quick Security Scan" and xfs will be disabled.
     
  16. Michael

    Michael Regular Member

    Joined:
    Jan 18, 2004
    Messages:
    166
    Likes Received:
    35
    Apparently its already disabled, it must be CSF/LFD playing up here. Thanks.
     
  17. Lucas

    Lucas Addict

    Joined:
    Nov 14, 2009
    Messages:
    62
    Likes Received:
    4
    Location:
    Costa Rica
    First Name:
    Lucas
    You can simply know what port you should NOT use by checking your CSF installation and seeing what's already opened. I always change my dedicated servers port to weird numbers like 2134 or 4678, things like that.
     
  18. David

    David Regular Member

    Joined:
    May 30, 2003
    Messages:
    1,088
    Likes Received:
    133
    Location:
    Australia
    /me scampers off to break into Lucas' server :devil:
     
  19. Bryce

    Bryce Regular Member

    Joined:
    Aug 24, 2009
    Messages:
    248
    Likes Received:
    12
    Location:
    New Jersey
    @David, let's do a breakin on Lucas' server! MUHAHAHAHAHA
     
  20. CubicWebsIntl

    CubicWebsIntl Regular Member

    Joined:
    Aug 31, 2012
    Messages:
    15
    Likes Received:
    0
    Location:
    Warwickshire
    First Name:
    Michael
    change the port to anything which isn't 22, should be fine, also make sure you allow the port though the firewall before you change it else you wont be able to connect at all.
     

Share This Page