webssh icon indicating copy to clipboard operation
webssh copied to clipboard

Update handler.py

Open meramsey opened this issue 4 years ago • 2 comments

Add SSH Agent key support.

Allows for SSH Agent use and key support if the local OS is setup for it thanks to Paramikos support of this.

Courtesy of this excerpt https://github.com/paramiko/paramiko/blob/ae3d0febef17a8ece5268bbf6c210a30573ce800/demos/demo.py#L41-L59

and my mod adding "allow_agent=True, look_for_keys=True," to the string ssh.connect(*args, allow_agent=True, look_for_keys=True, timeout=options.timeout)

This is working perfectly for me on Linux project and should work in Windows as well. http://docs.paramiko.org/en/stable/api/agent.html

This will allow for easy switching of servers and key management for those embedding into custom apps.

meramsey avatar Apr 06 '20 15:04 meramsey

Do you think it is really a good idea to enable these stuffs(allow_agent, look_for_keys) on your web server ?

huashengdun avatar Apr 07 '20 06:04 huashengdun

This is being run from local host bound pyqt5 app as an embedded ssh terminal in my case and will be by the other people using it in the way I am.

That is great point of concern though. It would be a great option but probably should not be a default option that's enabled.

 This could easily be added as  a command line option to wssh.

It's brings great flexibility to building apps with custom Ssh terminals. Just felt like sharing it upstream as a courtesy as I felt like others might also like that option.  I already have  a highly customized version of webssh with the more "extreme" mods like Ssh config file and key handling from sqlite3 db which is cool but not probably something most would ever use.  

Sent from Nine


From: Shengdun Hua [email protected] Sent: Tuesday, April 7, 2020 02:36 To: huashengdun/webssh Cc: WhatTheServer; Author Subject: Re: [huashengdun/webssh] Update handler.py (#144)

Do you think it is really a good idea to enable these stuffs(allow_agent, look_for_keys) on your web server ?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/huashengdun/webssh/pull/144#issuecomment-610202534

meramsey avatar Apr 07 '20 19:04 meramsey