|
ssh:// protocol handler
Sanford Selznick clued me into a little bit of hidden functionality in Mac OS X: Terminal.app is registered as the protocol handler for ssh://. Here's an example: ssh://localhost. If you're on Mac OS X, clicking on this link should launch Terminal.app (if it's not already running), which will spawn a new window holding a new ssh session.
That means every well-written app that can open URLs can start a ssh session. This includes apps like Safari, Mail.app and the Finder. It's also how you can make PasswordWallet automatically start a ssh session when you click on a password entry (hint: use the entry's "URL" field and click on the globe icon).
But wait, there's more. You can add switches and parameters to the ssh invokation with a little URI escaping. For example, opening ssh://localhost%20-l%20wolf%20ls would attempt to:
- Log you into the current machine. You'll need Remote Login enabled in the Sharing System Preferences pane.
- Using the account 'wolf'. You'll probably want to replace this with your own account name.
- Upon successful login, execute the
ls command. This is just an example, you could put any command in here so long you escape the URI correctly.
- Automatically logout when the command terminates. If you don't supply a command, then the
ssh session sticks around, as it should.
Update: Stefan Tilkov thinks this is a bad idea.
Thursday, July 17, 2003
12:00 AM
|
Focus of this site
Contact Me
Topics
RSS Feed
Linkblog
Twitter
Andy Finnell
Bill Bumgarner
Brent Simmons
Daniel Jalkut
Dave Dribin
Eric Albert
Eric Rescorla
Eric Sink
Greg Miller
Gus Mueller
Jeremy Zawodny
John Gruber
Mark Dalrymple
Michael Tsai
Peter Ammon
Raymond Chen
Ryan Wilcox
Scott Stevenson
Steven Frank
The Daily WTF
we hates software
Wil Shipley
|