You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Probably the best option is to parse $@before connecting to get user, hostname and port, since we can't know the real user, port and hostname used in remote machine. getopt and getops can help in this case.
It must use the same username/password/port provided in SSH command - if some of them was not provided, sbc should not use them explicitly (because user can have some specific configuration on ~/.ssh/config). For example, the parser is wrong when no username is provided, try: sbc ssh host
The bug is that it'll use ssh $USER@host instead of only ssh host to execute sbc plugins - it is wrong because I can have the UserName setting in my ~/.ssh/cofing for something different from $USER.
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 remotesbc
which username and port to use when connecting to local machine to execute a plugin.sbc
also gets remote machine's host and port fromSSH_CONNECTION
environment variable (on remote) and send it to the plugin on local machine, so the plugin can use it to create other connects (thecp
plugin uses it to copy files usingscp
, 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 onsbc ssh
and use it instead ofSSH_CONNECTION
.The text was updated successfully, but these errors were encountered: