0
Python ssh
i just can't download 3rd party libraries on qpython3, is there a way to connect and use ssh without installing 3rd party libraries?
5 ответов
+ 3
Yeah, I have the same problem ^^
Trying to use pip_console.py can even help, as the only module that I success to install ( until now ) is Alchemy... against all expectations :P
What have you try as ssh library?
I've made some tests with Crypto ( on desktop, not on QPython )... to generate a RSA pair, encrypt a password with the public key, and decrypt it with the private key... If I do all 3 steps in Python, all is right, but if I attempt to crypt on client side ( generating and decrypting still in Python ) with JS libraries ( what I found ), I do not obtain correct decryption ( with the most compatible JS library, I get the password decrypted, but at end of a long no-sense string ^^ ), while with all 3 steps in JS, all is also right...
Would you have some tracks for me? :)
+ 2
Yeah :)
Thank's for the re-motivation: for now, I didn't try further ( to install ) Paramiko module, neither test it online, but I restart my attempt to adapt the JS library I can use on client side ( "jsencrypt" ), to try to translate it in Python ( using "js2py" module )... and I have just succeeded, even if it's not necessarly a viable solution, given the slowness of execution :'(
... more than 2 minutes, on a i7 at 2.5GHz @@ ( even if execution is on a single core/thread )
And I was lucky for my first test: the next two failed to decrypt ( return a 'NoneType' object )... for testing only encrypt/decrypt with Python binding of JS libary...
Next steps are to perform a bunch of test with encrypt with JS, decrypt with Python, to see if I will also get fail, and maybe try to translate "manually" the JS library instead of using js2py tools ^^ ( and take advantage of it to lighten up the js version by keeping only what I really need :P )
+ 1
No, I don't ( the one I've tried and called 'Crypto' in my previous post, is named as is to be imported, but is named 'pycrypto' for pip installation ^^ )...
I will have a look, as it seems to be installed on my server side, but for testing purposes it's not convenient, and may be not simple to install on linux ( pip installation seems to need compiling the C library required, and for now, I stand with failure at compilation apparently -- seems to be a gcc error )...
So, if this is paramiko that you've tried to install with QPython, it don't surprised me that you don't success: android is a linux-like system, and you can expect to install a module on Qpython, only if the installation on linux is quiet very simple: no compilation, no need to write rights ( no use of 'sudo pip install', just 'pip install' ), because on android you don't have ( until you root your device )...
But when I asking for some tracks, it was more about the JS side... where I didn't find a lot of things for RSA encryption ( and I will like something lighter as possible, just for encrypt, neither decryption nor key generation ). And anyway, I wonder if my real problem is 3rd party library rather than the way I should go to correctly format the crypted password between JS output and Python input :( ( if it isn't -- but I don't believe -- when passing the public key from Python to JS ).
0
u tried paramiko
0
ow sorry my fault i meant *i tried paramiko*