Enabiling sshd (Secure Login Server ...

ismail

Registered
There are two versions of SSH. SSH1, and SSH2. Both can be run on OSXPB. To ssh to other hosts securely you only need use ssh. If you want to ssh to your own machine to login as another user, then you might want to start SSHD. Follow the steps mentioned below and you'll have both working fine:

1. Login as root using the 'su' command in the shell prompt.

2. Add the following line to the file /etc/hostconfig:

SSHSERVER=-YES-

3. Run the following command, to generate the necessary host keys in accordance with SSH1 protocol:

ssh-keygen -b 1024 -f /etc/ssh_host_key -N ""

4. Run the following command, to generate the necessary host keys in accordance with SSH2 protocol:

ssh-keygen -d -f /etc/ssh_dsa_host_key -N ""

5. Change permission on the generated files (as a re-assurance), so that no one can read them but "root":

chmod 700 /etc/ssh_host_key
chmod 700 /etc/ssh_dsa_host_key

6. Run sshd from the prompt:

sshd

7. Exist the "root" user session and get back into normal user session.

8. Run the following command, to generate your personal keys in accordance with SSH1 protocol:

ssh-keygen -b 1024

You'll be prompted to input a file name, just hit enter for the default presented.

You'll be prompted to input a "phrase", put the phrase and hit enter.

You'll be prompted to re-enter the phrase.

9. You are ready to ssh to your own machine.

ssh your-machine-name

10. If you want to use SSH2 protocol run the following command, which will generate the key in accordance with SSH2 protocol:

ssh-keygen -d

You'll be prompted to do the same as above for SSH1.

11. Run ssh with the '-2' option:

ssh -2 your-machine-name

That is all.



[Edited by ismail on 10-01-2000 at 11:53 AM]
 
I had to change the order of the ssh2 host key file to get this to work. "ssh_dsa_host_key" needed to be changed to "ssh_host_dsa_key" when I ran the keygen. Otherwise it errors when you run sshd.
 
Back
Top