Running ssh from AppleScript...
Running ssh from AppleScript...
- Subject: Running ssh from AppleScript...
- From: David Crowe <email@hidden>
- Date: Mon, 19 Jan 2004 10:26:13 -0700
I'm not having much success running 'ssh' from AppleScript.
The command line:
do shell script "(echo \"~/ssh-mail\" | login -f $USER ) &"
runs ssh (via the script 'ssh-mail' which only executes the Unix
'ssh' command with the right port mapping) but it logs out right away.
I used a similar command to run a VPN client in the background:
(do shell script "(echo \"echo y | /usr/local/bin/vpnclient
connect " & theProfile & " user " & theUserName & " pwd " &
thePassword & "\" | login -f $USER ) >/tmp/startvpn.tmp 2>&1 &")
I know piping the command line to login is a bit convoluted, but it's
the only way I could get it to work. As with vpnclient, running ssh
directly results in it complaining that it's standard input is not a
terminal.
- David Crowe
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.