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 Hanke, Oct 22, 2009
    1. Advertisements

  2. Peter Hanke

    Fabian Schuh Guest

    Hash: SHA1


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

    -----END PGP SIGNATURE-----
    Fabian Schuh, Oct 22, 2009
    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, Oct 22, 2009
  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

    Alexander Gran, Oct 22, 2009
  5. man ssh-keygen
    Chris F.A. Johnson, Oct 22, 2009
    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.