Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem using jumpssh dosent upload right remote path, library to ssh a server throught a gateway #193

Open
madiha95 opened this issue Feb 23, 2021 · 2 comments

Comments

@madiha95
Copy link

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.

@gaby
Copy link

gaby commented Mar 4, 2021

@madiha95 Can you post an example code?

@madiha95
Copy link
Author

madiha95 commented Mar 4, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants