When I ssh to a remote host, Is it possible that I get the remote bash pid in my local machine? or vice versa?
for example on local terminal, I simply do ssh and keep connection to run my tasks:
ssh user@remote.com
and the ps is like this on local machine:
ps faux
...
shunh 32683 0.1 0.0 121148 5116 pts/2 Ss 07:02 0:00 \_ -bash
shunh 33079 0.6 0.0 189360 8484 pts/2 S+ 07:03 0:00 \_ ssh -X remote_host
and on remote_host:
ps faux
...
root 214679 0.0 0.0 158820 5724 ? Ss 07:03 0:00 \_ sshd: shunh [priv]
shunh 214681 0.0 0.0 158820 2556 ? S 07:03 0:00 \_ sshd: shunh@pts/1
shunh 214682 0.0 0.0 121124 3608 pts/1 Ss 07:03 0:00 \_ -bash
So can I get the pid number "214682" in my local machine?