ssh-tools | : sob : 没找到好用的shell工具 : v : 自己实现类似Xshell的部分功能 | Command Line Interface library
kandi X-RAY | ssh-tools Summary
kandi X-RAY | ssh-tools Summary
:sob:没找到好用的shell工具:v:自己实现类似Xshell的部分功能
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ssh-tools
ssh-tools Key Features
ssh-tools Examples and Code Snippets
Community Discussions
Trending Discussions on ssh-tools
QUESTION
- Python 2.7.13
- Windows 10 64 bit
I've been working through this Udacity web dev course and wanted to try embedding a simple bokeh plot into a web page using this example. Running dev_appserver.py
gives the error: ImportError: No module named _ctypes
I have:
- Installed Bokeh and Numpy via pip
- Included Numpy in app.yaml
This answer states Google App Engine doesn't allow importing ctypes. However I'm unsure how to confirm if this is the case with Bokeh. Is this error caused by Bokeh importing ctypes? If so is there a work around?
...ANSWER
Answered 2017-May-25 at 19:07Edit: Please see the answer below for a new workaround from Google.
I can state categorically that Bokeh itself does not use ctypes
directly, anywhere in the library. But it does use NumPy, and it seems that at least some versions of NumPy do use ctypes
? This link:
http://kawahara.ca/using-numpy-on-google-app-engine-with-the-anaconda-python-distribution/
seems to suggest that only version 1.6 of NumPy is supported on GAE. I might assume this is either because that version does not use ctypes, or because Google has specifically whitelisted that version as acceptable somehow.
So the suggestion would be specifically install NumPy 1.6, and not the latest version (either using pip or conda or whatever).
QUESTION
Is there a Java library/example to read an openssh format ecdsa public key to a JCE PublicKey
in Java? I want to use EC for JWT .
The format I'm trying to read is as per authorized_keys, or Github API (e.g. https://api.github.com/users/davidcarboni/keys): ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK8hPtB72/sfYgNw1WTska2DNOJFx+QhUxuV6OLINSD2ty+6gxcM8yZrvMqWdMePGRb2cGh8L/0bGOk+64IQ/pM=
I've found this answer, which is fine for RSA and DSS: Using public key from authorized_keys with Java security, and this discussion of the openssh format for ECDSA: https://security.stackexchange.com/questions/129910/ecdsa-why-do-ssh-keygen-and-java-generated-public-keys-have-different-sizes
However I'm getting lost trying to adapt the RSS/DSA code for ECDSA - I'm not sure how to set up an ECPublicKeySpec
. It needs ECPoint
, EllipticCurve
, ECParameterSpec
, ECField
. The openssh format only contains two integers, which makes sense for ECPoint
, but I don't know how to set up the rest.
I've been poking around a bunch of libraries, including jsch, sshj, ssh-tools and good old Bouncycastle. The closest I have is:
com.jcraft.jsch.KeyPair load = com.jcraft.jsch.KeyPair.load(jsch, null, bytes[openSshKey]);
Which loads the key fine, but doesn't get me to a JCE PublicKey
- just a byte[] getPublicKeyBlob()
method.
Am I missing something obvious?
...ANSWER
Answered 2017-Jun-29 at 15:35I've found a way to do this using Bouncycastle (but would like to find a JCE way).
Adapting the code from Using public key from authorized_keys with Java security, and refering to RFC 5656, section 3.1, the following block added to decodePublicKey
will parse the single BigInt value Q, which is "the public key encoded from an elliptic curve point":
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ssh-tools
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page