On Monday, August 24, 2020, 07:47:42 PM GMT+1, Sebastian Miele
wrote:
>When I put
>
> (let ((pid (primitive-fork))
> (host THE-HOST)
> (control "~/.ssh/%C"))
> (if (eq? 0 pid)
> (execlp "ssh" "ssh"
> "-F" "none"
> "-S" control
>
vapnik spaknik writes:
>
> Even without the '-f' flag I still get the same problem in guile. If
> I print the pid of the child process I can see that it is different
> from the pid of the ssh process.
When I put
(let ((pid (primitive-fork))
(host THE-HOST)
(control
>On Monday, August 24, 2020, 03:27:57 PM GMT+1, Sebastian Miele
> wrote:
>
>Look at output of the following:
>
> pkill ssh
> ssh -S '~/.ssh/socket/%C' -N -M -f &
> echo $!
> pgrep -a ssh
>
>Then look at the output of:
>
> pkill ssh
> ssh -S '~/.ssh/socket/%C' -N -M &
> echo $!
> pgrep
Me:
> Look at output of the following:
>
> pkill ssh
> ssh -S '~/.ssh/socket/%C' -N -M -f &
> echo $!
> pgrep -a ssh
>
> Then look at the output of:
>
> pkill ssh
> ssh -S '~/.ssh/socket/%C' -N -M &
> echo $!
> pgrep -a ssh
>
For the tests I temporarily renamed my '~/.ssh/config'
vapnik spaknik writes:
> Oops, I forgot to include the "-M" flag in the previous post. That
> ensures the ssh connection is a master connection, and I get the same
> problem.
Look at output of the following:
pkill ssh
ssh -S '~/.ssh/socket/%C' -N -M -f &
echo $!
pgrep -a ssh
Then look
>On Monday, August 24, 2020, 01:05:31 PM GMT+1, Sebastian Miele
> wrote:
>vapnik spaknik writes:
>> (execlp "ssh" "ssh" "-S" "~/.ssh/%C" "-N" "-f" "remotehost")
>>
>> However, this doesn't work
>The problem probably is the following: The above invocation of 'ssh'
>with '-S' is the invocati
vapnik spaknik writes:
> (execlp "ssh" "ssh" "-S" "~/.ssh/%C" "-N" "-f" "remotehost")
>
> However, this doesn't work
The problem probably is the following: The above invocation of 'ssh'
with '-S' is the invocation of a slave. It creates a master (with a new
PID). After that it immediately exi
>This does not answer your exact question, but such behavior can be
>acheived very automatically by putting something like the following into
>~/.ssh/config:
>
> ControlMaster auto
> ControlPath ~/.ssh/socket/%C
> ControlPersist 5
>
>This automatically creates master processes. And the respe
Me:
> vapnik spaknik writes:
>
> >> ssh -S ~/.ssh/%C -N -f remotehost &
> >> rsync -au -e "ssh -S ~/.ssh/%C remotehost" remotehost:file1
> backupdir/file1
> >> rsync -au -e "ssh -S ~/.ssh/%C remotehost" remotehost:file2
> backupdir/file2
> >
> > and finally, find the pid and kill the ssh session:
vapnik spaknik writes:
>> ssh -S ~/.ssh/%C -N -f remotehost &
>> rsync -au -e "ssh -S ~/.ssh/%C remotehost" remotehost:file1 backupdir/file1
>> rsync -au -e "ssh -S ~/.ssh/%C remotehost" remotehost:file2 backupdir/file2
>
> and finally, find the pid and kill the ssh session:
>
>> ps -e|grep ssh
>
Hi,
I'm writing a backup script in guile, and want to run rsync several times
over the same ssh connection.
>From the shell command line I can start an ssh session with a control master
>socket, and then tell ssh to reuse that socket with each invocation of rsync:
> ssh -S ~/.ssh/%C -N -f rem
11 matches
Mail list logo