Results 1 to 2 of 2

Thread: SSH in debian/ubuntu safe login

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Standard RSP member
    Join Date
    13 Feb 2007
    Location
    Earth
    Posts
    1,977
    Mentioned
    0 Post(s)
    Rep Power
    84

    Post SSH in debian/ubuntu safe login

    SSH in debian/ubuntu safe login

    ''
    Changing the port sshd listens on is a simple process and some times is needed to prevent hacking.. it's just a matter of updating your sshd_config file and then reloading the new configuration.

    Use the procedure below to change the port that sshd is listening on to for example 21000 :

    Warning: Incorrectly following this procedure may render your server unreachable through SSH.
    1. From your terminal session, edit /etc/ssh/sshd_config

    2. Look for the following line:

    #Port 22

    3. Change the line so it looks like this:

    Port 21000

    4. Save and close the file

    5. Load the new configuration by using the service command

    /etc/init.d/sshd restart

    Note: you may immediately lose connectivity to your server on the open ssh session you are currently running.


    6. Test the connection

    $ ssh username@myhostnaname.com -p 21000

    If you're using PuTTy on Windows, you can specify the port number in the profile for you connection and then re-save the profile using the new port.

    Also you can specify who can login via ssh port ...
    Just edit this line :
    AllowUsers xxxxx ...so only user xxxxx can login with ssh to your pc..

    For more safety you can prevent root login to ssh...Just edit this line as:
    PermitRootLogin no

    So now you login as user and after with a su command you are the root..

    At last you can edit the time you have for writing the password with this line:
    LoginGraceTime 45 ... don't prefere much time...I think after this you made a small step to login to your server with the safest way... ''
    Last edited by me1960; 05-06-09 at 08:55.
    Don't dream your life - live your DREAMbox ! DON'T FORGET TO SAY '' THANKS '' Note: Viewing Pay TV without a valid subscription is illegal All the files available here are kept for experimental and educational purpose only!

  2. #2
    Standard RSP member skkip3r's Avatar
    Join Date
    11 Nov 2008
    Posts
    40
    Mentioned
    0 Post(s)
    Rep Power
    0

    Default Re: SSH in debian/ubuntu safe login

    Schimbarea portului nu inseamna ca ai rezolvat problema, e doar o chestiune de timp (nmap rezolva aceasta problema).

    In schimb nu trebuie sa iti faci griji in privinta SSH. Diferenta intre SSH si telnet este ca SSH (Secure Shell) nu poate fi acultat. De ce? Pentru ca, pentru fiecare computer in parte, care face rlogin prin acest protocol, se formeaza un RSA (amprenta - denumire care vine de la Rivest, Shamir si Adelman, dezvoltatorii acestui protocol).

    Deci, informatiile trimise - primite prin acest protocol vor putea fi interceptate numai daca acel utilizator care "asculta" portul SSH are si acea amprenta.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •