How to use pub keys (not ssh password) in ssh command?

Discussion in 'Linux Networking' started by Peter Hanke, Oct 22, 2009.

  1. Peter Hanke

    Peter Hanke Guest

    Assume I want to open an SSH connection from Linux to a remote computer.

    How can I use local pub/priv key files as parameters for authentication in this command?
    Remote computer supports ssh key files.

    Again: I do not want to use user/password for this but generated key files.

    Peter
     
    Peter Hanke, Oct 22, 2009
    #1
    1. Advertisements

  2. Peter Hanke

    Fabian Schuh Guest

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Google?
    http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/internet/node31.html

    - --
    (`/\
    `=\/\
    `=\/\
    `=\/
    _\___ best regards
    ) ( -- Fabian Schuh
    ( INK )
    \___/
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEARECAAYFAkrgLy4ACgkQ8lOKSygtYjgSvwCgxnvQUtC54ULiWmXW5/V5pVQ2
    xdMAn2/ujVCV+QMnqN2e8iGyuvI+OVug
    =4u1G
    -----END PGP SIGNATURE-----
     
    Fabian Schuh, Oct 22, 2009
    #2
    1. Advertisements

  3. Peter Hanke

    Grant Guest

    You need to transfer the public key to the remote computer, either
    via a 'normal' user/password login or some other transfer method.

    See: 'man ssh-copy-id'

    Grant.
     
    Grant, Oct 22, 2009
    #3
  4. man ssh:
    -i identity_file
    Selects a file from which the identity (private key) for RSA or DSA
    authentication is read. The default is ~/.ssh/identity for protocol
    version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol version 2.
    Identity files may also be specified on a per-host basis in the
    configuration file. It is possible to have multiple -i options (and
    multiple identities specified in configuration files).

    i.e. ssh -i /home/joe/private_foo/ssh_id_special

    regards
    Alex
     
    Alexander Gran, Oct 22, 2009
    #4
  5. man ssh-keygen
     
    Chris F.A. Johnson, Oct 22, 2009
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.