Re: SSH Blocking

From: Beretta (invalid_at_invalid.org)
Date: 04/26/05

  • Next message: Paul Yeatman: "Re: discover not finding CDROM"
    Date: Mon, 25 Apr 2005 16:56:55 -0700
    To: debian-user@lists.debian.org
    
    

    On Mon, 25 Apr 2005 23:50:15 +0200, in linux.debian.user you wrote:

    >On Mon, Apr 25, 2005 at 02:26:04PM -0700, Beretta wrote:
    >> If you want to elimintate the possibility that one of these scans and/or login
    >> attempts will eventually succeed (unlikely if you use good passwords), then
    >> disable root login to ssh and disable password based logins.
    >
    >That would work great for me right now -- when I'm using my
    >laptop and I have my laptop's public key in
    >~/.ssh/authorized_keys on all the remote servers I care
    >about. But what do I do when I come to a new machine and
    >want to log into the server? I need to get the public key up
    >there somehow.
    >
    <snip>

    No no. You generate one public and private key pair. In all the machines you
    want to login to you put the PUBLIC part in ~/.ssh/authorized_keys.

    You keep the SECRET part with you. (by with you I mean on a floppy, or a usb
    dongle, or in the home directory of your personal machine, or .. you get the
    idea)

    A good analogy would be like PGP/GNUPG. The public key is widely dissemminated.
    The secret key is kept secret and private.

    I'm not 100% sure of the exact mechanics that are used, by I belive it is thus:
    When you attempt to login, the remote machine encrypts the login sequence to
    your public key (which it finds in ~/.ssh/authorized_keys. Only the private key
    can possibly decrypt that sequence. So when you ssh client (be it ssh or putty
    or securecrt, etc) sends back the correct response, you have authenticated with
    cryptographic certainty.

    One of the nice benefits is that if you are damn sure that your personal machine
    is spyware/virus free and won't end up in the hands of an evil doer, you can
    generate your keypair so that the private key has no password required to
    decrypt it. Thus you get a nice secure password-less login. If you are overly
    paranoid like me when you generate your keypair you give a password that is used
    to encrypt the private key. Thus if someone manages to steal your laptop or usb
    dongle or floppy (etc), they still don't have access to the private key, as it
    is wrapped in 128bit encryption.

    And yes, that's the exact same method that PGP/GNUPG uses.

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Paul Yeatman: "Re: discover not finding CDROM"

    Relevant Pages

    • RE: TIPS FOR THE NEWCOMER
      ... using your old private key, so there's no point in keeping a backup. ... > security risk if I send this through e-mail as an attachment to the ssh ... > has been compromised it does not really matter since it is a public key ... > more words for the passphrase it gets harder to crack? ...
      (SSH)
    • Re: Restricting ssh access to selected hosts
      ... Then copy the public key to the target box with: ... >> You can make the ssh server key-only, ... > want to login as "userB" on the server. ...
      (comp.os.linux.security)
    • Re: SSH with Public Key Authentication (Was: Re: Attention: Giorgos Keramidas (Was: CVS Import Permi
      ... and got stuck setting up the public key login. ... I spent a few hours yesterday trying to get SSH going again. ... Log in using your private key from the server (ie. login to the ...
      (freebsd-questions)
    • Re: ssh private and public keys known_host etc...
      ... If I generate the key file do I generate it on the host I want to ssh ... private key is on localhost, ... is the private key and the other the public key. ...
      (comp.security.ssh)
    • Re: remote shutdown windows from linux
      ... just make sure you restart the openssh service after you make your ... folder where you put your ".ssh" folder. ... not able to login using the public key. ... I was just wondering if you were able to do it using public key. ...
      (microsoft.public.windowsxp.general)