Description
When a client connects to a remote machine using sbc ssh
, sbc
creates a file named $HOME/.sbc/config
on remote with some environment variables that tell remote sbc
which username and port to use when connecting to local machine to execute a plugin. sbc
also gets remote machine's host and port from SSH_CONNECTION
environment variable (on remote) and send it to the plugin on local machine, so the plugin can use it to create other connects (the cp
plugin uses it to copy files using scp
, for example).
The bug appears when you connect to a remote machine using another IP/port pair than that pair in SSH_CONNECTION
(it can happen if you have a port-forward in the middle of the connection). So, remote machine will think as you connected to that IP/port (because ot received the connection from there) but local machine connected to another IP/port (which was forwarded by the middle machine).
To solve this bug sbc
should record on remote machine the original user/host/port used on sbc ssh
and use it instead of SSH_CONNECTION
.