Script Login to ARD Console
Script Login to Remote ARD Session
Historical Apple Remote Desktop automation. Confirm compatibility and credential handling before adapting it.
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'