这是我第一次访问github并且我没有使用控制台.我在Macbook上(使用Bash).当我尝试访问github时,我得到了这个:
git clone git@github.com:dhulihan/league-of-legends-data-scraper.git
Cloning into 'league-of-legends-data-scraper'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
我已经尝试按照Github页面上关于权限被拒绝的说明 当我使用ssh -vT git@github.com时,我得到以下内容:
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to github.com [192.30.252.129] port 22.
debug1: Connection established.
debug1: identity file /Users/XXXX/.ssh/id_rsa type -1
debug1: identity file /Users/XXXX/.ssh/id_rsa-cert type -1
debug1: identity file /Users/XXXX/.ssh/id_dsa …Run Code Online (Sandbox Code Playgroud) 如何在两种公钥格式之间进行转换,一种格式为:
-----BEGIN PUBLIC KEY-----
...
-----END PUBLIC KEY-----
Run Code Online (Sandbox Code Playgroud)
另一种格式是:
-----BEGIN RSA PUBLIC KEY-----
...
-----END RSA PUBLIC KEY-----
Run Code Online (Sandbox Code Playgroud)
例如,我使用ssh-keygen命令生成了id_rsa/id_rsa.pub对,我使用以下方法计算了id_rsa中的公钥:
openssl rsa -in id_rsa -pubout -out pub2
Run Code Online (Sandbox Code Playgroud)
然后我再次使用以下方法从id_rsa.pub计算公钥:
ssh-keygen -f id_rsa.pub -e -m pem > pub1
Run Code Online (Sandbox Code Playgroud)
pub1的内容是:
-----BEGIN RSA PUBLIC KEY-----
MIIBCgKCAQEA61BjmfXGEvWmegnBGSuS+rU9soUg2FnODva32D1AqhwdziwHINFa
D1MVlcrYG6XRKfkcxnaXGfFDWHLEvNBSEVCgJjtHAGZIm5GL/KA86KDp/CwDFMSw
luowcXwDwoyinmeOY9eKyh6aY72xJh7noLBBq1N0bWi1e2i+83txOCg4yV2oVXhB
o8pYEJ8LT3el6Smxol3C1oFMVdwPgc0vTl25XucMcG/ALE/KNY6pqC2AQ6R2ERlV
gPiUWOPatVkt7+Bs3h5Ramxh7XjBOXeulmCpGSynXNcpZ/06+vofGi/2MlpQZNhH
Ao8eayMp6FcvNucIpUndo1X8dKMv3Y26ZQIDAQAB
-----END RSA PUBLIC KEY-----
Run Code Online (Sandbox Code Playgroud)
而pub2的内容是:
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA61BjmfXGEvWmegnBGSuS
+rU9soUg2FnODva32D1AqhwdziwHINFaD1MVlcrYG6XRKfkcxnaXGfFDWHLEvNBS
EVCgJjtHAGZIm5GL/KA86KDp/CwDFMSwluowcXwDwoyinmeOY9eKyh6aY72xJh7n
oLBBq1N0bWi1e2i+83txOCg4yV2oVXhBo8pYEJ8LT3el6Smxol3C1oFMVdwPgc0v
Tl25XucMcG/ALE/KNY6pqC2AQ6R2ERlVgPiUWOPatVkt7+Bs3h5Ramxh7XjBOXeu
lmCpGSynXNcpZ/06+vofGi/2MlpQZNhHAo8eayMp6FcvNucIpUndo1X8dKMv3Y26
ZQIDAQAB
-----END PUBLIC KEY-----
Run Code Online (Sandbox Code Playgroud)
根据我的理解,pub1和pub2包含相同的公钥信息,但它们的格式不同,我想知道如何在两种格式之间进行转换?任何人都可以向我展示两种格式的简明介绍吗?
我在向Vagrant VM添加ssh密钥时遇到了问题.基本上我在这里的设置工作正常.一旦创建了VM,我就可以访问它们vagrant ssh,用户"vagrant"存在,并且该authorized_keys文件中有该用户的ssh密钥.
我现在要做的是:能够通过ssh或使用连接到这些VM scp.所以我只需要将我的公钥添加id_rsa.pub到authorized_keys- 就像我一样ssh-copy-id.
有没有办法告诉Vagrant在设置过程中应该包含我的公钥?如果没有(根据我的谷歌搜索结果,可能是这样),有没有办法在流浪汉设置过程中轻松附加我的公钥?
我使用PuTTY Key Generator生成带密码的4096位RSA-2密钥.
我保存.ppk和openSSL格式的公钥.putty格式的公钥不起作用.
无论如何,我的错误如下:
$ ssh -T git@github.com
key_load_public: invalid format
Enter passphrase for key '/c/Users/Dan/.ssh/id_rsa':
Hi Dan! You've successfully authenticated, but GitHub does not provide shell access.
Run Code Online (Sandbox Code Playgroud)
有什么问题?
我使用Pageant来加载密钥,我使用Git Bash来尝试ssh连接.我还把密钥加载到GitHub中,不知道我做错了什么.
我尝试添加一个新行,而不是在GitHub中添加新行
来自Android In App Billing版本3(TrivialDrive)的示例应用程序随附sdk
/* base64EncodedPublicKey should be YOUR APPLICATION'S PUBLIC KEY
* (that you got from the Google Play developer console). This is not your
* developer public key, it's the *app-specific* public key.
*
* Instead of just storing the entire literal string here embedded in the
* program, construct the key at runtime from pieces or
* use bit manipulation (for example, XOR with some other string) to hide
* the actual key. The key itself …Run Code Online (Sandbox Code Playgroud) 我使用Puttygen创建公钥和私钥,然后准备让Windows 7上的TortoiseHg通过转到
ssh://somebody@code.somewhere.com/somecode
Run Code Online (Sandbox Code Playgroud)
但似乎没有地方可以将私钥添加到TortoiseHg?(甚至只是mercurial命令行)
该文件已经在硬盘上的一些文件somefile.ppk有人知道如何添加它吗?
我尝试使用ssh连接到planetlab节点.它会抛出像Permission denied(publickey,键盘交互式)这样的错误.这是什么意思?这是例外的冗长.
> OpenSSH_5.1p1 Debian-5ubuntu1, OpenSSL
> 0.9.8g 19 Oct 2007 debug1: Reading configuration data /etc/ssh/ssh_config
> debug1: Applying options for * debug2:
> ssh_connect: needpriv 0 debug1:
> Connecting to planetlab1.csee.usf.edu
> [131.247.2.241] port 22. debug1:
> Connection established. debug1:
> permanently_set_uid: 0/0 debug3: Not a
> RSA1 key file /home/keven/.ssh/id_rsa.
> debug2: key_type_from_name: unknown
> key type '-----BEGIN' debug3:
> key_read: missing keytype debug2:
> key_type_from_name: unknown key type
> 'Proc-Type:' debug3: key_read: missing
> keytype debug2: key_type_from_name: …Run Code Online (Sandbox Code Playgroud) 我正在使用Paramiko通过ssh连接到服务器.
基本身份验证运行良好,但我无法理解如何连接公钥.
当我用putty连接时,服务器告诉我这个:
Using username "root".
Authenticating with public key "rsa-key@ddddd.com"
Passphrase for key "rsa-key@ddddd.com": [i've inserted the passphrase here]
Last login: Mon Dec 5 09:25:18 2011 from ...
Run Code Online (Sandbox Code Playgroud)
我用这个ppk文件连接到它:
PuTTY-User-Key-File-2: ssh-rsa
Encryption: aes256-cbc
Comment: rsa-key@dddd.com
Public-Lines: 4
[4 lines key]
Private-Lines: 8
[8 lines key]
Private-MAC: [hash]
Run Code Online (Sandbox Code Playgroud)
使用基本身份验证,我得到的错误(来自日志)是:
DEB [20111205-09:48:44.328] thr=1 paramiko.transport: userauth is OK
DEB [20111205-09:48:44.927] thr=1 paramiko.transport: Authentication type (password) not permitted.
DEB [20111205-09:48:44.927] thr=1 paramiko.transport: Allowed methods: ['publickey', 'gssapi-with-mic']
Run Code Online (Sandbox Code Playgroud)
我试图包含那个ppk文件并设置为auth_public_key,但是没有用.
你能帮助我吗?
我需要在JavaScript中使用RSA加密一些数据.周围的所有库都要求指数和模数,但我public.key从对手那里得到一个文件.
如何从RSA文件中检索公共exponent和modulus部分?