我正在从源码编译腻子工具最新版本的问题。 我让他们在一些红帽服务器上工作,但不是其他人; 我没有得到所有工具的输出。 例:
加工;
[root@server1 dir]# /usr/local/bin/puttygen -t rsa -b 2048 -C "tmp" -o /tmp/test ++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++ Enter passphrase to save key: Re-enter passphrase to verify: [root@server1 dir]# [root@server1 dir]# /usr/local/bin/puttygen Usage: puttygen ( keyfile | -t type [ -b bits ] ) [ -C comment ] [ -P ] [ -q ] [ -o output-keyfile ] [ -O type | -l | -L | -p ] Use "puttygen --help" for more detail. [root@server1 dir]#
不工作:
[root@server2 dir]# /usr/local/bin/puttygen -t rsa -b 2048 -C "tmp" -o /tmp/test ^C [root@server2 dir]# [root@server2 dir]# /usr/local/bin/puttygen Usage: puttygen ( keyfile | -t type [ -b bits ] ) [ -C comment ] [ -P ] [ -q ] [ -o output-keyfile ] [ -O type | -l | -L | -p ] Use "puttygen --help" for more detail. [root@server2 dir]#
命令只是坐在那里,直到我逃出来,这是为了puttygen,plink等。
为了增加一些,我已经安装了havegen来增加熵,但plink不返回数据。 通过plink运行命令“主机名”的示例:
工作服务器
[root@server working]# cat /proc/sys/kernel/random/entropy_avail 3181 [root@server working]# /usr/local/bin/plink -v -ssh -i /sftp/private_keys/backup username@hostname hostname Connecting to xx.xx.xx.xx port 22 We claim version: SSH-2.0-PuTTY_Release_0.70 Server version: SSH-2.0-OpenSSH_6.6 We believe remote version has SSH-2 channel request bug Using SSH protocol version 2 Doing ECDH key exchange with curve Curve25519 and hash SHA-256 Server also has ecdsa-sha2-nistp256/ssh-dss/ssh-rsa host keys, but we don't know any of them Host key fingerprint is: ssh-ed25519 256 8c:cb:64:77:c4:35:a9:80:99:51:c0:f8:73:24:1d:dc Initialised AES-256 SDCTR client->server encryption Initialised HMAC-SHA1 client->server MAC algorithm Initialised AES-256 SDCTR server->client encryption Initialised HMAC-SHA1 server->client MAC algorithm Reading key file "/sftp/private_keys/backup" Using username "username". Offered public key Offer of public key accepted Authenticating with public key "rsa-key-20171024" Sent public key signature Access granted Opening session as main channel Opened main channel Started a shell/command Server sent command exit status 0 this.is.my.hostname.com Disconnected: All channels closed [root@server working]#
没有返回数据服务器
[root@server notworking]# cat /proc/sys/kernel/random/entropy_avail 2962 [root@server notworking]# /usr/local/bin/plink -v -ssh -i /sftp/private_keys/backup username@hostname hostname Connecting to xx.xx.xx.xx port 22 We claim version: SSH-2.0-PuTTY_Release_0.70 Server version: SSH-2.0-OpenSSH_6.6 We believe remote version has SSH-2 channel request bug Using SSH protocol version 2 Doing ECDH key exchange with curve Curve25519 and hash SHA-256 Server also has ecdsa-sha2-nistp256/ssh-dss/ssh-rsa host keys, but we don't know any of them Host key fingerprint is: ssh-ed25519 256 8c:cb:64:77:c4:35:a9:80:99:51:c0:f8:73:24:1d:dc Initialised AES-256 SDCTR client->server encryption Initialised HMAC-SHA1 client->server MAC algorithm Initialised AES-256 SDCTR server->client encryption Initialised HMAC-SHA1 server->client MAC algorithm Reading key file "/sftp/private_keys/backup" Using username "backup". Offered public key Offer of public key accepted Authenticating with public key "rsa-key-20171025" Sent public key signature Access granted Opening session as main channel Opened main channel Started a shell/command Server sent command exit status 0 Disconnected: All channels closed [root@server notworking]#
你应该看看你的系统上可用的熵。
RSA密钥生成需要大量的熵。 我在未准备好的虚拟机上遇到了一些性能下降(约100倍)。 如果cat /proc/sys/kernel/random/entropy_avail显示100以下的东西,你可以安装haveged例如。
将-t标志添加到plink命令可以返回数据
enable / disable pty allocation