Main Page | Report this Page
Linux Forum Index  »  Linux Networking  »  How to use pub keys (not ssh password) in ssh command?...
Page 1 of 1    

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

Author Message
Peter Hanke...
Posted: Thu Oct 22, 2009 3:52 am
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
 
Fabian Schuh...
Posted: Thu Oct 22, 2009 3:52 am
Guest
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter Hanke <peter_ha at (no spam) andres.net> schrieb:
Quote:
Again: I do not want to use user/password for this but generated key files.
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-----
 
Grant...
Posted: Thu Oct 22, 2009 4:40 am
Guest
On 22 Oct 2009 09:52:02 GMT, peter_ha at (no spam) andres.net (Peter Hanke) wrote:

Quote:
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.

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.
--
http://bugsplatter.id.au
 
Alexander Gran...
Posted: Thu Oct 22, 2009 5:06 am
Guest
Peter Hanke wrote:

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

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 root at (no spam) host.com

regards
Alex
 
Maxwell Lol...
Posted: Thu Oct 22, 2009 5:15 am
Guest
peter_ha at (no spam) andres.net (Peter Hanke) writes:

Quote:
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



(1) generate a keypair using ssh-keygen
(2) copy the *.pub file to the remote computer
(3) append this file to the ~/.ssh/authorized_keys (or authorized_keys2) file
 
Jon Solberg...
Posted: Thu Oct 22, 2009 8:06 am
Guest
On 2009-10-22, Peter Hanke <peter_ha at (no spam) andres.net> wrote:
Quote:
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.

man ssh

--
Jon Solberg (remove "nospam." from email address).
 
Chris F.A. Johnson...
Posted: Thu Oct 22, 2009 8:29 am
Guest
On 2009-10-22, Peter Hanke wrote:
Quote:
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.

man ssh-keygen


--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sun Nov 29, 2009 5:32 am