question

AbdulRahmanBahaa-5817 avatar image
0 Votes"
AbdulRahmanBahaa-5817 asked ·

lost ssh-agent during connection to ssh from a python script running on WebApp Server

I have a web application that requires running some python scripts on the server.

lost ssh-agent occurs whenever trying to access an ssh server from a python script which works perfectly on any local PC.

I'm assuming that the problem is with the opened ports in the web app service

azure-webappsazure-webapps-ssh
· 2
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

"lost ssh-agent" does not appear to be a known error message based on my searching via our internal tools. Can you please provide us with the exact error message that you are receiving? This will help us better understand where and why the error is occurring.

Also, are you using a container web app or a non-container web app?

0 Votes 0 ·

I may have not explained enough, but "lost ssh-agent" is a problem in python connecting to an ssh server, that problem doesn't exist while running the same python script on the Local machines.
and it appears to occur when trying to run the script on the web app server.

here is the script that I'm trying to run on the web app server which gives "lost ssh-agent" exception.

 from sshtunnel import open_tunnel


 server = open_tunnel(
     (SSHServerIP, 10001),
     ssh_username="abdul",
     ssh_password="secur1ty",
     remote_bind_address=('127.0.0.1', 10001)
 )
 server.start()


I'm not sure about which type of web application I'm using currently but I think it's non-container web app

0 Votes 0 ·

0 Answers