Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Jerry Goodwin
August 11, 2004, 6:41 pm
rate this thread
trouble getting this to work, mostly with quoting, but it finally
worked. The putty doc was great, but I had trouble passing arguments
through to the unix script. So now that its working, I thought I'd
post to give an example, since from searching the forum it looks like
others try this same thing also.
I'm setting up my native-windows xemacs to do compiles on our linux
machine running openssh 2. I have xemacs issuing the following
command in a windows non-cygwin shell:
pageant.exe C:\putty\private.ppk -c plink -v -X -batch mysession \
/bin/csh -c 'cd subdir; doitscript arg1 arg2 arg3 >& alloutput'
pageant.exe and putty.exe are in my windows path. The signature is
pasted into my ~/.ssh/authorized_keys file as per the putty doc.
pageant already has the passphrase, so there's no prompting. This
works perfectly; either the problem others posted about a couple years
ago on this list have been fixed or I'm avoiding those problems by
using windows-native xemacs instead of cygwin-xemacs. The arguments
get passed to the doitscript; that was the hardest part. The key is
the single forward quotes around the shell command line, no other
quotes will work. Without quotes plink tries to interpret the >& and
gets an error. (I suppose if I was a linux guru I would have
instinctively known the right quotes to use).
I haven't figured out how to capture the output of the script back
through the ssh connection to xemacs; that's why I redirect it to a
file, this is then loaded by xemacs by the lisp command that puts
together the plink command and executes it. I also don't have a good
way to tell when its done, the command line execution returns to
xemacs immediately, so I have a hard-coded delay in my lisp code. But
Thanks to the putty team for a cool tool!
Re: plink from windows to linux under xemacs using ssh works great
You are avoiding those problems by using a native xemacs. There's a
known problem with trying to use pageant from cygwin, documented in:
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — Newest thread in » Secure Shell Forum