I've been working on some projects that require running perl script from a UNIX command shell. This is pretty easy when I'm working in my apartment on my mac, but otherwise I'm stuck with having to ssh into one of the other servers on campus. Often times they are preoccupied with other people's projects and they run slow because of it. What's my solution? Pump ssh through a different port so that I can log on to my G4 from anywhere, on campus or off. I also wanted the ability to have the server function normally. ie: listen on port 22 as well as 5900.
Here's how to do it with Mac OS 10.4.8:
1. Either sudo -s to switch to root or sudo all of the commands in the following steps.
2. Edit /etc/services to include the following: (I put this right under the existing ssh port)
ssh2 5900/udp
ssh2 5900/tcp
3. Duplicate /System/Library/LaunchDaemons/ssh.plist using the following command:
cp /System/Library/LaunchDaemons/ssh.plist /System/Library/LaunchDaemons/ssh2.plist
4. Edit the new ssh2.plist file changing the SockServiceName lines to read:
<key>SockServiceName</key>
<string>ssh2</string>
5. Also change the Label string:
<key>Label</key>
<string>com.openssh.sshd2</string>
6. Reboot your computer and you're all done!
Awsome!
This worked perfect, thanks!
One extra tip -- if you follow Matt's instructions exactly, you don't have to reboot when you're done. All you need to do is:
sudo launchctl load /System/Library/LaunchDaemons/ssh2.plist