Script Login to ARD Console

Send the following code via Unix command in ARD to log in. Be sure to change ‘usernamegoeshere’ and “passwordgoeshere” to their correct values for your systems. Lastly, this code snippet assumes the username field is currently selected on the remote system.

osascript -e
'tell application "System Events" to keystroke "usernamegoeshere"';
osascript -e
'tell application "System Events" to keystroke tab';
osascript -e
'tell application "System Events" to keystroke "passwordgoeshere"';
osascript -e
'tell application "System Events" to keystroke return'

DavisSystem

Consolidated Notes From the Desk of Sean Davis.


Script Login to Remote ARD Session

By Sean, 2011-10-18