problem using jumpssh dosent upload right remote path, library to ssh a server throught a gateway
I'm coming here to ask you about jumpssh library if anybody had before the same problem,
So I tried to use the library in orther to connect to a server throught a gateway , and this is working fine , normally I'm connected ,
But when trying to execute some specific command the shell said that I need to install some tools , while they are already on the remote server . "xxx is not your PATH or not executable please install it".
And when showing the content of the remote path it dosent seem to show the same path as when I do directly in the server , I found this strange but certainly there is and explanation that I'm still ignoring .
Im supposing that the jumpssh library have some limits or specification that I ignore whenever I ve read the documentation : https://jumpssh.readthedocs.io/en/latest/api.html ( I followed this documentation to connect to my remote server throught the gateway.
else do you suggest another library for doing this ?
Anybody can suggest some tips ?
Thanks in advance.
@madiha95 Can you post an example code?
from jumpssh import SSHSession
gateway_session = SSHSession('machinegatway','xxxxxx',password='xxx').open()
remote_session = gateway_session.get_remote_session('machineremote',password='xxxxx*')
remote_session.is_active()
print(remote_session.get_cmd_output('cmd'))
remote_session.close()
remote_session.is_active()
it is a simple code to test the library , actually the remark that I have ,for exemple if you try to show the path variable content of the remote server it wont show you the right one , in my case it shows the one of the server from which I have executed the code ,
and that is confirmed because when trying to use some specific command ( not the linux ones ) it tells me to install some specific and add some specific stuff that is already on the remote server