ssh: safe auto login
Register

We are the best invite forum on the internet! Here you will find free invites, free seedboxes, free bonuses, and much more. Our members know the true meaning of sharing and have created a truly global bittorent community! Our site has the most up to date information on all private trackers and our members will guide you and introduce you to this truly secretive and enlightened club. Ready to get started? Register now!


Results 1 to 5 of 5
  1. #1

    Join Date
    Sep 2009
    Posts
    312

    Default ssh: safe auto login

    hi,

    my first tut here and i hope you like it :001_smile:
    of course for some it's not new but maybe it can help someone so here we go ...


    annoyed by having to enter your password everytime you log into your dedicated server or seedbox or whatelse via ssh? there's a safe and quick solution. the first steps have to be done on your box at home.
    so at first the


    Home Part:

    depending on which ssh app you have it can be different but let's go with the commonly used opensource version openssh for now. (putty has some helper apps for that, read at the end).



    now let's get to it. open the command prompt or cygwin (depends on what you have) and execute:
    Code:
    ssh-keygen
    when it's asking for a password just hit enter. you can also choose the location of the files to be generated or just accept the defaults. go to the folder where the new files have been created and open the public file. it might have been named "id_rsa.pub". be sure to open it with a good texteditor e.g. NOT wordpad.
    copy the whole content.


    now the Server Part:

    login to your server and enter the following:
    Code:
    cd .ssh
    cat >> authorized_keys
    now the command line is waiting for your input what would be the content of the public key file you copied already so just paste that in. then to get back to the 'normal' command line hit CTRL+D. Now there's only one more step to do:
    Code:
    chmod 600 authorized_keys
    for cygwin or other terminals that might be enough so try it out by logging out and back in. you should get in just like that. no password anymore and even safer than a normal password because your generated personal and unique key is used.


    For Putty:

    to make it work for putty and maybe other ssh apps you have to run some kind of public key server named Pageant. it's on the putty download site. they also have an app to generate the keys if you don't feel like using the terminal called PuTTYgen.
    the usage of Pageant is easy. just fire it up, point it to your public key file and let it run in the backgrund. as long as it's running they key can even be used in the normal windows command prompt or other gui apps.


    this guide works on any unix like os and under cygwin or similar apps on windows. actually all you need is a unix terminal and off you go

    if you have any questions post them here so everyone can benefit from the solution.
    Last edited by rHA2Or8z; October 27th, 2009 at 08:55 PM.


  2. To remove ads become VIP. Inquire about advertising here.
  3. #2

    Join Date
    Jul 2009
    Location
    Philadelphia, PA - USA
    Posts
    899

    Default

    Good tutorial. I do this a little differently, but this works just as good. In my opinion this is one of the first things users should do when getting a server or seedbox. The other would be changing the ssh port from 22 to something else. With these two options your server is that much safer then the normal login. I log my firewall connections on my dedi and u would be suprised at how many connection attempts on port 22 i get. At least 25 a day.

  4. #3

    Join Date
    Sep 2009
    Posts
    312

    Default

    Quote Originally Posted by MikeD View Post
    Good tutorial. I do this a little differently, but this works just as good. In my opinion this is one of the first things users should do when getting a server or seedbox. The other would be changing the ssh port from 22 to something else. With these two options your server is that much safer then the normal login. I log my firewall connections on my dedi and u would be suprised at how many connection attempts on port 22 i get. At least 25 a day.
    changing ports would be the next guide :001_smile:

    however portscanners can identify the service no matter which port ...

  5. #4

    Join Date
    Jul 2009
    Location
    Philadelphia, PA - USA
    Posts
    899

    Default

    Yeah thats definitely true and there is no getting around that. Thats why u should always take the necessary steps in protecting yourself as it limits the chances. I even use a different ftp port then the default and also connect through a tunnel with vnc. Like i mentioned in my other post, this is a great tutorial and should be one of the first things a user does when they get a new server or seedbox. Thanks.

  6. #5

    Join Date
    Nov 2008
    Posts
    57

    Default

    Just a caveat.

    If you don't chmod 600 to your authorized_keys file, your auto login will not work.
    It is something the guys in the office always come to me about - "why doesn't my login work? ... i've followed the set up doc"

    I had a nickle every time someone said that!!

Similar Threads

  1. Replies: 1
    Last Post: September 7th, 2011, 12:52 AM
  2. Auto-Login Greasemonkey type script?
    By Bandersnatch in forum Coders - Hello World!
    Replies: 5
    Last Post: April 3rd, 2011, 01:11 PM
  3. mIRC auto login scripts
    By whofarted in forum Help
    Replies: 2
    Last Post: November 11th, 2009, 11:00 AM
  4. POLL - Do you think young people are safe on the internet?
    By SunSpyda in forum General Discussion
    Replies: 40
    Last Post: August 17th, 2009, 08:27 AM

Tags for this Thread

Posting Permissions

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