Re: Non-interactive SSH Login.

From: Darren Dunham (ddunham_at_redwood.taos.com)
Date: 04/26/03

  • Next message: Darren Tucker: "Re: OpenSSH 3.6.1p1 and AIX 4.3"
    Date: Sat, 26 Apr 2003 00:24:18 GMT
    
    

    ColoC <colocoloc@yahoo.com> wrote:

    > First I generated rsa key on box_1. And I have the following files
    > under "~/.ssh/":

    > authorized_keys (which I "mv id_rsa.pub authorized_keys")
    > id_rsa
    > known_hosts
    > prng_seed
    > ssh_config (in which I only have "Protocol 2" open)

    > Then on box_2, I did "ssh myuser@box_1" to build that "~/.ssh/"
    > directory, and I have the following files:

    > prng_seed
    > known_hosts

    > Then I ftp box_1's "authorized_keys" to box_2 "~/.ssh/" directory, try
    > the following:

    By putting the "authorized_keys" file on box 2, then you have now
    authorized that key to connect *to* box 2.

    > ssh -o BatchMode=yes myuser@box_1

    Ah, but that looks like you're trying to connect from box 2 to box 1.
    That won't work since you don't have the key on Box 2.

    > The system prompt:

    > Permission denied (publickey,password,keyboard-interactive).

    > Then I ftp box_1's "id_rsa" to box_2 "~/.ssh/" try the following:

    > ssh -o BatchMode=yes myuser@box_1

    > suceeded in logon box_1 without password prompt. And I even tried

    > ssh myuser@box_1

    > succeeded in logon box_1 without password prompt. Then I tried

    > mv authorized_keys abc
    > ssh myuser@box_1

    > suceeded in logon box_1 without password prompt.

    > So this seems to me that it makes no difference if I have that public
    > key on box_2 or not, and it does not matter too much how "ssh_config"
    > on box_1 restricts the BatchMode=no or not, whenever I have that
    > "id_rsa" on box_2, I can logon.

    1) Of course it makes a difference. You've put both the key information
       (id_rsa) and the authroization (authorized_keys) on both hosts, so
       you can ssh to both hosts.
    2) BathMode=no will only prevent questions from being asked. It doesn't
       prevent publickey authentication from being used.

    > Certainly, I know this is NOT correct for a good ssh configuration --
    > if you have got to have that "id_rsa", then why bother to generate its
    > "id_rsa.pub"? Plus "id_rsa" seems to be the very thing ssh is
    > meaningful in security, why do I have to share it on other boxes in
    > order to have a non-interactive login?

    id_rsa is the *key*. You must have it on the client.
    authorized_keys is the authorization. By putting the public part of a
    key (id_rsa.pub) in it on the *server*, you athorize an account holding
    the other part of the key to connect.

    > Can you help me explain the above testing results?

    It looked to me that you were trying to put the key on the server and
    the authorization on the client, which is backward.

    -- 
    Darren Dunham                                           ddunham@taos.com
    Unix System Administrator                    Taos - The SysAdmin Company
    Got some Dr Pepper?                           San Francisco, CA bay area
             < This line left intentionally blank to confuse you. >
    

  • Next message: Darren Tucker: "Re: OpenSSH 3.6.1p1 and AIX 4.3"

    Relevant Pages

    • Re: Kerberized authorization service
      ... whereas the LDAP solution is already what they do. ... the mail server could have an shell group with one ... that the authorization decision is no longer truly centralized. ... Kerberized conduit for passing the data from the client to some backend ...
      (comp.protocols.kerberos)
    • Re: Kerberized authorization service
      ... whereas the LDAP solution is already what they do. ... the mail server could have an shell group with one ... While this could no doubt be made to work, it would tie the authorization ... This client and server could conceivably be created ...
      (comp.protocols.kerberos)
    • Re: How to update data inside a text file in Java ?
      ... Actually I used database in the server side. ... database in client will bias the target. ... authorization of the user is ...
      (comp.lang.java.programmer)
    • Re: IIS authentication (kerberos and Integrated security)
      ... Most challenge/response authentication protocols rely on a challenge being issues, and the client using that to develop a response which is sent back to the server. ... the client is *not* sending the correct authorization data to the server for the second request. ... WWW-Authenticate header? ...
      (microsoft.public.inetserver.iis.security)
    • Kerberos with Windows Integrated authentication
      ... I need help with Kerberos and Windows integrated security. ... Domain controller, IIS, Client. ... in the OK response, How IIS server generates the ... has not a Authorization header and reuse the ...
      (microsoft.public.windows.server.security)