ssh-keygen -t rsa -f .ssh/clear_rsaNext, create the launchd entry /Library/LaunchDaemons/org.mefi.theft.plist containing the following, again changing macuser and remoteuser@remotehost.net, note you'll need sudo access.
scp .ssh/clear_rsa.pub /etc/ssh_host_key.pub remoteuser@remotehost:.
ssh remoteuser@remotehost
echo -n 'command="",no-X11-forwarding ' >> .ssh/authorized_keys
cat clear_rsa.pub >> .ssh/authorized_keys
cat ssh_host_key.pub >> .ssh/known_hosts
rm clear_rsa.pub ssh_host_key.pub
<?xml version='1.0' encoding='UTF-8'?>You activate this launchd entry with the command "launchctl load /Library/LaunchDaemons/org.mefi.theft.plist", note you cannot have a space after the -i. In theory, you should have access to your machine by running the command "ssh macuser@localhost -p 2222" on the server remotehost.net. If anything goes wrong, debug it by looking for errors in Console.app. You could trivially adapt these instructions to Linux, but not Windows.
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version='1.0'><dict>
<key>Label</key><string>org.mefi.theft</string>
<key>UserName</key><string>macuser</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/ssh</string>
<string>-nNTx</string>
<string>-i/Users/macuser/.ssh/clear_rsa</string>
<string>-R 2222:127.0.0.1:22</string>
<string>remoteuser@remotehost.net</string>
</array>
<key>Debug</key><false/>
<key>Disabled</key><false/>
<key>OnDemand</key><false/>
<key>RunAtLoad</key><false/>
</dict></plist>
« Older "Daria" Photoshoot... | It's Good to be Tim Tebow.... Newer »
This thread has been archived and is closed to new comments
That being said - this was incredibly well done.
posted by rebent at 8:48 PM on November 28, 2011