Non standard ports for SSH

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

  1. Michael

    Michael Regular Member

    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

    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

    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

    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

    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

    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

    So a restart of Apache is needed! Thanks for the help :D
     
  8. David

    David Regular Member

    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

    Thanks I will try that now and see how it goes!
     
  10. Michael

    Michael Regular Member

    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

    I'm confused :???:, can you tell me what you're trying to do again :D
     
  12. Michael

    Michael Regular Member

    Disable SSHv1 within sshd_config :D
     
  13. David

    David Regular Member

    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

    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

    Go into your WHM and under Security run "Quick Security Scan" and xfs will be disabled.
     
  16. Michael

    Michael Regular Member

    Apparently its already disabled, it must be CSF/LFD playing up here. Thanks.
     
  17. Lucas

    Lucas Addict

    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

    /me scampers off to break into Lucas' server :devil:
     
  19. Bryce

    Bryce Regular Member

    @David, let's do a breakin on Lucas' server! MUHAHAHAHAHA
     
  20. CubicWebsIntl

    CubicWebsIntl Regular Member

    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