Hello, on Tuesday 08 May 2012 at 10:21, Matt Welland wrote: > On Mon, May 7, 2012 at 3:23 PM, Richard Hipp <d...@sqlite.org> wrote: > > > I tried a number of approaches to implementing ssh:. I finally settled on > > the following: > > > > (1) Run the "ssh" command using system() to get a shell on the remote > > system. > > (2) Send an "echo" command and get the reply. Hopefully this will move > > past the welcome banner. > > (3) Run "fossil http" on the remote side. > > (4) Start sending HTTP requests from the local side to the remote, and > > accepting replies back. > > (5) After the last reply is received, shut down the SSH pipe. > > > > [...] > > [...] > > What I'm currently seeing is the following: > > chlr11723> fossil clone > ssh://host.com/tmp/mrwellan/blah/fossils/test.fossiltest.fossil > ssh -e none -T host.com > ssh: Reflection for Secure IT 6.1.2.1 (build 3005) on x86_64-suse-linux-gnu > (64-bit) > fossil: ssh connection failed: [] > > But "ssh host.com ls" works fine. I'll do more digging ....
You are probably already aware of this, but please note that there are significant differences between `ssh host command` (like in your last line) and sending "command" through `ssh host` (like what fossil does). Among relevant differences are at least that `ssh host command` does not invoke a shell, sshd's fork invokes exec on the command directly, so your `ssh host.com ls` runs /bin/ls instead of a shell's builtin ls. Moreover, by default `ssh host` creates a pty on the remote side, while `ssh host command` provdes `command` with non-pty-ish file descriptors for standard I/O. To be honest, I can't think of any reason to bother with welcome banners, ptys, shells and their respective init files, except when there are some important environment variables that *have* to come from remote side (and cannot come from local side or sshd config). Of course, I'm not seeing the big picture, so I'm probably missing something, and I might over-estimate my past bad experiences with pty and shell layers. Hoping this helps, Natacha
pgp3IsItTL4zC.pgp
Description: PGP signature
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users