All, I am running Secureplatform NG with AI R55 with HFA 008. From my linux workstation, I can log onto the the Secureplatform box just fine with password. However, I would like to do via private/public key instead of password because I have scripts that need to copy files from the Splat box back to my linux workstation. However, I just can not get the private/public key to work on the splat box. I can get private/public key work from my linux workstation with the Nokia box just fine. Furthermore, I can also get this to work between my linux workstation with another linux server so I don't understand why it doesn't work with the Splat box. Here are my steps: on the linux workstation: 1) ssh-keygen -t rsa 2) copy the id_rsa.pub from my linux workstation into the authorized_keys on the Splat box 3) restart sshd on the splat box 4) connect from the linux workstation: ssh -l admin splat_IP_address that doesn't work.. What am I doing wrong? Help. David P.S. I notice that when I run "ssh-keygen -t rsa" on the Splat box, it put the "id_rsa" and "id_rsa.pub" under /root/.ssh directory. Is it normal since "admin" is essentially "root" in splat?
One other thing I forgot to mention is that from the Splat box, I can establish private/public key to other unix/linux boxes just fine. I have problem when other unix/linux workstations want to log onto this splat box via public/private key authentication instead of password.
if you are ssh'ing with the admin account, and the splat box is generating your RSA and DSA keys under root, then the ssh keys would not work for admin, as they are in the root account
*I think*
__________________
RoxcoR Technologies
www.pheusion.com
Security / Cryptography / Application development
I spent some time writing and testing the instructions below.
Enjoy
-Robert H.
Using a Public-Private Key pair to connect as root to a Checkpoint Secureplatform (SPLAT) firewall from a Linux workstation via SSH
Login as root on the linux workstation and type the following:
ssh-keygen -t rsa
The system responds with the following text:
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Continuing on the linux workstation, if you do not want the default path and/or name, type a new path and name for the file, then hit the enter key. Otherwise just hit the enter key. These instructions assume that the default file name, “id_rsa” was used.
The system responds with the following text:
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Continuing on the linux workstation, type a passphrase, if desired, then hit the enter key.
The system responds with the following text:
Enter same passphrase again:
Continuing on the linux workstation, re-type the passphrase, then hit the enter key.
The system responds with something similar to the following text, if the default filenames are used.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
Continuing on the linux workstation, edit the file /etc/ssh/ssh_config, and set the following configuration item.
IdentityFile ~/.ssh/id_rsa
If you are not already connected to the SPLAT firewall, login.
7. If you are not already in expert mode on the SPLAT firewall, switch to expert mode by typing the following:
expert
Copy the public key that was generated in steps 1,2,3,4 above on the linux workstation, to the “/tmp” directory on the SPLAT firewall.
Continuing on the SPLAT firewall, type the following on the SPLAT firewall. These instructions assume that root’s home directory is “/root” and the public key file is “id_rsa.pub”:
mkdir /root/.ssh
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys
rm /tmp/id_rsa.pub
Continuing on the SPLAT firewall, edit the file /etc/ssh/sshd_config. Make sure the “Port” and ListenAddress” are correct for your environment, and set the following configuration items.
StrictModes no
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
If the username “root” is present on the “DenyUsers” line, remove it.
Continuing on the SPLAT firewall, save and exit the file /etc/ssh/sshd_config.
Continuing on the SPLAT firewall, type the following to restart the ssh daemon:
“service sshd restart”
Make sure your firewall rules allow ssh from the linux workstation to the SPLAT firewall, or stop the firewall (for testing purposes only) by typing the following on the SPLAT firewall: “cpstop”
On the linux workstation, type the following to connect to the SPLAT firewall with ssh:
“ssh –l root <IP address>”
( You should connect without typing a password)
If you have trouble add a “-v” parameter to the above statement for troubleshooting on the linux workstation.