Open Apple Remote Desktop selection in SSH

John C. Welch posted a handy AppleScript which grabs selected addresses from Apple Remote Desktop and opens SSH sessions in the terminal for each one.  Hard to believe this isn’t built into ARD.  I’d previously used a hard coded AppleScript to open up these sessions.  Having them opened from the live scan list is very handy!

I took out the hard coded username in the SSH string and added an activate command to the terminal to bring the windows to the front.

set theSSHList to {}
tell application “Remote Desktop”
set theComputers to the selection
repeat with x in theComputers
set the end of theSSHList to Internet address of x
end repeat
end tell

tell application “Terminal”
activate
repeat with x in theSSHList
do script “ssh ” & (contents of x)
end repeat
end tell

You must be logged in to comment on this post (damn those spammers)

Already registered?

Username

Password

forgot password?       register