OK. It does pay to know which ssh you are using.
$ ssh -V
OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090605f
this pointed me to the proper syntax for using private/public keys and ssh
public/private passwordless keys using: ksh and OpenSSH
This process allows an ssh connection between 2 servers without command-line authentication and run commands via a program.
From the server you will be connecting from: create a key pair:
ssh-keygen -t rsa #note: I did not use passphrase - just hit �enter'
<<output to screen>>
Generating public/private rsa key pair.
Enter file in which to save the key (/home/WebARCH/ol_inv/.ssh/id_rsa):
Created directory '/home/WebARCH/ol_inv/.ssh'.
Enter passphrase (empty for no passphrase): <press enter key and bypass>
Enter same passphrase again: <press enter key and bypass>
Your identification has been saved in /home/djm/.ssh/id_rsa.
Your public key has been saved in /home/djm/.ssh/id_rsa.pub.
The key fingerprint is:
3c:7e:41:2c:d2:51:f8:0b:ef:78:e7:e3:22:eb:af:6a ol_inv@dpbmdb2
Once you have generated a key pair, you must now install the public key on the server that you wish to log into. The public portion is stored in the file with the extension .pub in an ASCII encoding. Note: it is all one continuous line without line breaks.
Now you need to move that public key to the remote server paying close attention to file permissions. UNIX is very particular when it comes to file permissions. In order for the private key (resides on the source server �.ssh/id_rsa' to be recognized there cannot be any permissions for group or other, just for user:
-rw------- 1 ol_inv whs 883 Aug 23 09:26 id_rsa
To enable public key authentication on a server, you need to append the public portion of the key to the/.ssh/authorized_keys file. This may be accomplished with the following command-line:
ssh dwebapp1 "umask 077; cat >> .ssh/authorized_keys" </.ssh/id_rsa.pub
^^^^^^^^ ^^^^^^^^^^^^
Remote server Source server
The restrictive umask is required because the server will refuse to read/.ssh/authorized_keys files which have loose permissions. Once the public key is installed on the server, you should now be able to authenticate using your private key
Test your keys:
ssh username@host
If you do not see your remote server's splash page and you see the following page:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/usr/local/ol_inv/.ssh/id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /usr/local/ol_inv/.ssh/id_rsa
Enter passphrase for key '/usr/local/ol_inv/.ssh/id_rsa':
Then you need to go back and check the permissions on the source server where the private key resides: id_rsa
After you correct your permissions on that file:
chmod 700 id_rsa
Try again:
ssh remoteuser@remoteserver
Note: replace remoteuser with actual user name on remote server
replace remoteserver with actual remote server name