• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Running ssh from AppleScript...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Running ssh from AppleScript...
      • From: Christopher Nebel <email@hidden>
    • Re: Running ssh from AppleScript...
      • From: "John W. Baxter" <email@hidden>
    • Re: Running ssh from AppleScript...
      • From: Doug McNutt <email@hidden>
  • Prev by Date: Re: Custom Icons?
  • Next by Date: Re: String searching
  • Previous by thread: Re: String searching
  • Next by thread: Re: Running ssh from AppleScript...
  • Index(es):
    • Date
    • Thread