Playing with OpenSSH public keys


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris BigAdmin RSS Playing with OpenSSH public keys
# 1  
Old 12-10-2008
Playing with OpenSSH public keys

This article provides three OpenSSH tricks that revolve around the authorized_keys files, such as how to let remote users access your internal hosts while restricting access to the router itself.

More...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

PGP importing public keys method

Hi Guys, I am trying to import the public of vendor to my system. I am getting below error while importing public key. can anyone please help me with this?? laranakejt4:/u/raja/.pgp $ pgp --import secure.asc 0x1545A56A52:import key (4007:key failed signature check) secure.asc:import key... (2 Replies)
Discussion started by: Vinoth Kumar G
2 Replies

2. Red Hat

Converting SUN_SSH public key to openssh format

Hi Can someone please suggest how to convert this SUN_SSH public key to openssh key. I have converted few ssh2 public keys to openssh key, for passwordless authentication. I am not sure which version of sun_ssh is, here is the o/p $ ssh -V Sun_SSH_1.1.2, SSH protocols 1.5/2.0, OpenSSL... (1 Reply)
Discussion started by: bobby320
1 Replies

3. Shell Programming and Scripting

sftp using private and public keys

hi guys , i have few files i have to do sftp, the public and private key work like a magic , no problem at all the syntax is as below sftp -0 identityfile=~/ure/blsl/loc2/.ssh/id_rsa_ssh1 ssh1@remote >log_dir/file.timestamp<<end lcd folder cd folder put * quit end ================ my... (3 Replies)
Discussion started by: rockymayavia
3 Replies

4. Shell Programming and Scripting

SFTP - Private and Public keys

Hi All, I have a query....say on server A, I have generated the Private and Public keys and shared the public key with server B. Now i can surelyconnect(without password) from server A to server B..... but can i similarly connect from server B to server A as well Regards (1 Reply)
Discussion started by: Arpit Narula
1 Replies

5. UNIX for Advanced & Expert Users

openssh 5.3 needs password vs. 4.3 using private keys

Hello, I just installed a bran new Centos 6.2 including openssh 5.3. On older servers I installed older Linux including openssh 4.3, I am using keygen with private/public keys to log root on all servers (in a LAN) without typing password each time. To do this, of course, I have my local... (4 Replies)
Discussion started by: epoins
4 Replies

6. Shell Programming and Scripting

What are public keys in ssh and how do we create the public keys??

Hi All, I am having knowledge on some basics of ssh and wanted to know what are the public keys and how can we create and implement it in connecting server. Please provide the information for the above, it would be helpful for me. Thanks, Ravindra (1 Reply)
Discussion started by: ravi3cha
1 Replies

7. Solaris

Public keys for GPG Encryption

HI, I'm trying to encrypt a file and i'll FTP it to a external server.When i encrypt it using the command gpg -e -r 'recipient name' <filename> its asking me for public keys.Is there a way to encrypt without having to give the public keys? or if i need to give public keys i... (1 Reply)
Discussion started by: James777
1 Replies

8. UNIX for Dummies Questions & Answers

ssh public/private Keys

Hello, I have an issue with an outside party trying to deliver a file to our server via SFTP. I have setup the .ssh directory under the home directory for the user account that is being used and setup the authorized_keys file with correct permissons etc for .ssh directory and file. We... (2 Replies)
Discussion started by: richo king
2 Replies

9. UNIX for Dummies Questions & Answers

ssh public keys

Hello*! I have problems with public keys. On one side i have Solaris 10, and on other side is HP UNIX. I created public keys on Solaris with "ssh-keygen -t rsa", append id_rsa.pub key to ~user/.ssh/authorized_keys on remote machine, and tried to connect with ssh without password. But for some... (1 Reply)
Discussion started by: ghost01
1 Replies

10. UNIX for Advanced & Expert Users

SSH public and private keys

Firstly, i apologise if i have posted in a wrong section of the forum. Please let me know which is the correct section my post should go to. I have to SCP a file from one server(server A) to another (server B). I read around that a secure way is to use public and private keys. Assuming my... (2 Replies)
Discussion started by: new2ss
2 Replies
Login or Register to Ask a Question
puttygen(1)							 PuTTY tool suite						       puttygen(1)

NAME
puttygen - public-key generator for the PuTTY tools SYNOPSIS
puttygen ( keyfile | -t keytype [ -b bits ] ) [ -C new-comment ] [ -P ] [ -q ] [ -O output-type | -l | -L | -p ] [ -o output-file ] DESCRIPTION
puttygen is a tool to generate and manipulate SSH public and private key pairs. It is part of the PuTTY suite, although it can also inter- operate with the private key formats used by some other SSH clients. When you run puttygen, it does three things. Firstly, it either loads an existing key file (if you specified keyfile), or generates a new key (if you specified keytype). Then, it optionally makes modifications to the key (changing the comment and/or the passphrase); finally, it outputs the key, or some information about the key, to a file. All three of these phases are controlled by the options described in the following section. OPTIONS
In the first phase, puttygen either loads or generates a key. Note that generating a key requires random data (from /dev/random), which can cause puttygen to pause, possibly for some time if your system does not have much randomness available. The options to control this phase are: keyfile Specify a private key file to be loaded. This private key file can be in the (de facto standard) SSH-1 key format, or in PuTTY's SSH-2 key format, or in either of the SSH-2 private key formats used by OpenSSH and ssh.com's implementation. -t keytype Specify a type of key to generate. The acceptable values here are rsa and dsa (to generate SSH-2 keys), and rsa1 (to generate SSH-1 keys). -b bits Specify the size of the key to generate, in bits. Default is 1024. -q Suppress the progress display when generating a new key. In the second phase, puttygen optionally alters properties of the key it has loaded or generated. The options to control this are: -C new-comment Specify a comment string to describe the key. This comment string will be used by PuTTY to identify the key to you (when asking you to enter the passphrase, for example, so that you know which passphrase to type). -P Indicate that you want to change the key's passphrase. This is automatic when you are generating a new key, but not when you are modifying an existing key. In the third phase, puttygen saves the key or information about it. The options to control this are: -O output-type Specify the type of output you want puttygen to produce. Acceptable options are: private Save the private key in a format usable by PuTTY. This will either be the standard SSH-1 key format, or PuTTY's own SSH-2 key format. public Save the public key only. For SSH-1 keys, the standard public key format will be used (`1024 37 5698745...'). For SSH-2 keys, the public key will be output in the format specified by RFC 4716, which is a multi-line text file beginning with the line `---- BEGIN SSH2 PUBLIC KEY ----'. public-openssh Save the public key only, in a format usable by OpenSSH. For SSH-1 keys, this output format behaves identically to public. For SSH-2 keys, the public key will be output in the OpenSSH format, which is a single line (`ssh-rsa AAAAB3NzaC1yc2...'). fingerprint Print the fingerprint of the public key. All fingerprinting algorithms are believed compatible with OpenSSH. private-openssh Save an SSH-2 private key in OpenSSH's format. This option is not permitted for SSH-1 keys. private-sshcom Save an SSH-2 private key in ssh.com's format. This option is not permitted for SSH-1 keys. If no output type is specified, the default is private. -o output-file Specify the file where puttygen should write its output. If this option is not specified, puttygen will assume you want to overwrite the original file if the input and output file types are the same (changing a comment or passphrase), and will assume you want to output to stdout if you are asking for a public key or fingerprint. Otherwise, the -o option is required. -l Synonym for `-O fingerprint'. -L Synonym for `-O public-openssh'. -p Synonym for `-O public'. The following options do not run PuTTYgen as normal, but print informational messages and then quit: -h, --help Display a message summarizing the available options. -V, --version Display the version of PuTTYgen. --pgpfp Display the fingerprints of the PuTTY PGP Master Keys, to aid in verifying new files released by the PuTTY team. EXAMPLES
To generate an SSH-2 RSA key pair and save it in PuTTY's own format (you will be prompted for the passphrase): puttygen -t rsa -C "my home key" -o mykey.ppk To generate a larger (2048-bit) key: puttygen -t rsa -b 2048 -C "my home key" -o mykey.ppk To change the passphrase on a key (you will be prompted for the old and new passphrases): puttygen -P mykey.ppk To change the comment on a key: puttygen -C "new comment" mykey.ppk To convert a key into OpenSSH's private key format: puttygen mykey.ppk -O private-openssh -o my-openssh-key To convert a key from another format (puttygen will automatically detect the input key type): puttygen my-ssh.com-key -o mykey.ppk To display the fingerprint of a key (some key types require a passphrase to extract even this much information): puttygen -l mykey.ppk To add the OpenSSH-format public half of a key to your authorised keys file: puttygen -L mykey.ppk >> $HOME/.ssh/authorized_keys BUGS
There's currently no way to supply passphrases in batch mode, or even just to specify that you don't want a passphrase at all. PuTTY tool suite 2004-03-24 puttygen(1)