Lisp HUG Maillist Archive

Calling scp or rsync with LispWorks.

I'm looking at LispWorks' various system functions looking for something
I would like it to do.

sys:call-system-showing-output
sys:call-system
sys:run-shell-command
sys:open-pipe

I would like to be able to use scp and rsync to move files to a remote
server. However, both depend on SSH and SSH attempts to solicit a
password via a terminal and failing that, does not work.  The SSH
standard error message ("Pseudo-terminal will not be allocated because
stdin is not a terminal.") is displayed.

For example:
(call-system-showing-output "ssh cperkins@192.168.1.247")
; ssh cperkins@192.168.1.247
; Pseudo-terminal will not be allocated because stdin is not a terminal.


I know that SSH can be set up with public/private keys for a
passwordless connection, however the users of my software are not
technically savvy and the setup required for that will be beyond their
ability.


I've spent a bit of time mucking around with the different streams and
options on these different commands but either I'm doing something wrong
(very likely) or it is impossible (also very likely).  Anyone have any
advice or guidance?  Can someone tell me definitively that it is or is
not possible?  Is there any way to programmatically provide the terminal
input back to SSH? I have the users password ready to be written onto
any stream needed.

Thanks,

Chris Perkins
Media Lab, Inc. 


P.S.  LispWorks 5.1.2 Mac and Windows.  Though Mac alone would be
acceptable.


Re: Calling scp or rsync with LispWorks.


Have a look at ssh's -t/-T/-n options- scripting ssh can be tough even 
inside a shell script.  The tty related song and dance is hard to deal 
with but it can be done- ppp over ssh to punch thru firewalls works 
pretty well.

Passing in a password is going to be a toughie, but ssh-keygen & moving 
around the keys is not hard, particularly if you can script it in some 
way to help your users.  Once you get the password/passphrase-free 
logins working (which is naughty btw) then ssh becomes a lot easier to 
deal with.

Greg


On 10/11/11 14:45, Chris Perkins wrote:
>
> I'm looking at LispWorks' various system functions looking for something
> I would like it to do.
>
> sys:call-system-showing-output
> sys:call-system
> sys:run-shell-command
> sys:open-pipe
>
> I would like to be able to use scp and rsync to move files to a remote
> server. However, both depend on SSH and SSH attempts to solicit a
> password via a terminal and failing that, does not work.  The SSH
> standard error message ("Pseudo-terminal will not be allocated because
> stdin is not a terminal.") is displayed.
>
> For example:
> (call-system-showing-output "ssh cperkins@192.168.1.247")
> ; ssh cperkins@192.168.1.247
> ; Pseudo-terminal will not be allocated because stdin is not a terminal.
>
>
> I know that SSH can be set up with public/private keys for a
> passwordless connection, however the users of my software are not
> technically savvy and the setup required for that will be beyond their
> ability.
>
>
> I've spent a bit of time mucking around with the different streams and
> options on these different commands but either I'm doing something wrong
> (very likely) or it is impossible (also very likely).  Anyone have any
> advice or guidance?  Can someone tell me definitively that it is or is
> not possible?  Is there any way to programmatically provide the terminal
> input back to SSH? I have the users password ready to be written onto
> any stream needed.
>
> Thanks,
>
> Chris Perkins
> Media Lab, Inc.
>
>
> P.S.  LispWorks 5.1.2 Mac and Windows.  Though Mac alone would be
> acceptable.
>


Updated at: 2020-12-10 08:37 UTC