Why?
The advantage of remotely and securely administering your Linux box, either from a Mac on your LAN or from the outside, is tremendous! For example, you can edit and configure your old PPC running as linux server much easier from a G3/G4 with MacSSH by opening several sessions and copy and paste between them. As a newbie I find this very useful since I'm able to read a 'man page' for any subject and at the same time edit the config file in question in another session window. This also gives a better overview of files and directories. My Linux learning have taken a big leap since I made my SSH server/client set up funtional.
Prequisites:
- SSH server installed and running ('openssh package'). It's included in YDL2/2.1 but might not be installed. For more on this:
www.openssh.com.
- A Macintosh SSH client installed on your remote machine, this is so easy I won't touch on it here. For more: www.macssh.com
If your SSH server didn't install 'keys' this might solve the problem. Just leave 'passphrase' blank if you don't want that extra security:
ssh-keygen -b 1024 -t rsa -f /etc/ssh/ssh_host_rsa_key [ENTER]The 'rsa/dsa' keys are for protocol 'ssh2' which is supported in MacSSH application. I might mention that here, I had a problem after a 'full install' of YDL 2.0, there were no rsa/dsa keys and I couldn't log in. When confused consult the 'man pages', there are pages for 'sshd' and 'ssh-keygen' amongst other openssh stuff.
ssh-keygen -b 1024 -t dsa -f /etc/ssh/ssh_host_dsa_key [ENTER]
ssh-keygen -b 1024 -f /etc/ssh/ssh_host_key [ENTER]
Further edits that you might have to make in your config files are:
- In '/etc/hosts.allow' add a line: 'sshd:' followed by your mac's ip number or your subnet, such as '192.168.1.'
- In 'etc/rc.d/rc.local' add a line: 'sshd' to start your server at
startup. I use 'sshd -4' to make it run in only IPV4 mode.
- Type the command 'chkconfig -del sshd' to NOT make it run from inet services. The recommendation is to start the ssh server from rc.local
This HOWTO was written by Ake Svensson




