spawn sh -c "ssh -T $host -l $user <$JOBSCRIPT" #HowCanI elim sh?



pls consider this snip of expect:

spawn /bin/bash -c "ssh -T $host -l $user <$JOBSCRIPT"
# had to use the 'sh -c' approach support the '<' redirection

# ====================================================================
# wait for passwd prompt
# normal next send enters password
# ====================================================================
set __comment_on_last_send "no send yet, just spawned ssh"
expect {

"assword:" {
send "$PW\r"
set _comment_on_last_send "passwd entered, waiting on job completion..."
}
--snip

Is there a way to eliminate the bash shell in the spawn above?
Notice that the remote script is supplied as the STDIN to ssh.

--
thanks/regards
.



Relevant Pages

  • Re: VNC over SSH and SOCKS
    ... The first is that some "ssh" binaries are setuid root (because they need ... The second possibility is the socks config itself. ... *INCLUDING* the bindto the socks server". ...
    (comp.security.ssh)
  • strange messages in /var/log and all logins refused ...
    ... box and was refused (SSH 2.9 sent back the passwd prompt and ... root passwd and could ssh in successfully. ... hardware and config) that did *not* have any of this stuff. ... SBC Yahoo! ...
    (freebsd-questions)
  • Re: Is SSH worth it??
    ... The argument that Ettercap claims to break SSH ... So there really will be no major change in the scripts, ... first time key exchange. ...
    (Security-Basics)
  • Re: putty and SuSE and OpenSSH2 without password
    ... > key into putty but with the same effect. ... using ssh with the -vvv switch to get debugging info. ...
    (comp.security.ssh)
  • Late Summary: TRU64 Unix V5.1B - Issues with SecureCopy
    ... To use ssh on my Alphas in the past we installed and setup OpenSSH. ... [SNIP, SNIP] ... these issues come up in compatibility with OpenSSH and SSH2 ... The answer is to take a copy of the OpenSSH scp program, rename it to scp1, ...
    (Tru64-UNIX-Managers)