2 ms·
Depends on your shell, but you can try this yourself -- for instance: $ ssh localhost -o ProxyCommand="ssh localhost 'pstree -a \$PPID >&2 ; nc %h %p'"
by CUViper 12y ago
Depends on your shell, but you can try this yourself -- for instance:
$ ssh localhost -o ProxyCommand="ssh localhost 'pstree -a \$PPID >&2 ; nc %h %p'"
sshd
`-bash -c pstree -a $PPID >&2 ; nc localhost 22
`-pstree -a 6703
Bash invoked this way will be non-interactive. Often bashrc will test "$PS1" to bail early in this case, but the point remains that it does run. I also tried my command with echos before and after that test in my bashrc to confirm what happens.