我有一个configuration了sshd的Ubuntu Server 9.10包装盒。 我有两台电脑与Windows 7专业和腻子安装。 一天前,两台电脑都能通过putty和plink连接ubuntu服务器。 我在ubuntu服务器上安装了sun-java6-jre ,现在有一个奇怪的问题。 首先Windows 7计算机仍然可以连接腻子GUI和命令行plink 。 第二台电脑可以通过腻子gui连接,但如果我发出plink命令,在第一台电脑上完美的作品:
plink www.hostname.tk -ic:\users\username\documents\key\private.ppk
我得到login提示,input与第一台计算机相同的用户名,并收到以下奇怪的错误消息:
bash: www.hostname.tk: command not found
我不能看到我的Windows 7电脑之间的任何区别:(。 ppk键使用是相同的(我复制了多次这两种方式) hostname和username是一样的任何人有任何想法为什么发生这样的事情,我能做什么为了排除故障并修复它?
更新:
logging下plink -v disaplys:
Offered public key Offer of public key accepted Authenticating with public key "imported-openssh-key" Access granted Opened channel for session Started a shell/command bash: www.hostname.tk: command not found Server sent command exit status 127 Disconnected: All channels closed
你可以尝试运行plink -v并发布输出? 下面我改变了命令echo $ PATH:
C:\Documents and Settings\dave>plink 10.0.1.1 -v /bin/echo $PATH Looking up host "10.0.1.1" Connecting to 10.0.1.1 port 22 Server version: SSH-2.0-OpenSSH_5.1p1 Debian-6ubuntu2 We claim version: SSH-2.0-PuTTY_Release_0.60 Using SSH protocol version 2 Doing Diffie-Hellman group exchange Doing Diffie-Hellman key exchange with hash SHA-256 Host key fingerprint is: ssh-rsa 2048 4a:84:5d:a8:a2:29:95:c0:4e:92:d1:38:68:e6:2b:5f 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 login as: dmo [email protected]'s password: Sent password Access granted Opened channel for session Started a shell/command Server sent command exit status 0 /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games Disconnected: All channels closed
以及PC 1可以连接使用它的公平说,你的服务器仍然是YP和运行,并不古怪。
如果我是你,我会去挖掘PC 2,看看有什么不同PC 1。新的防火墙更新,不同的防火墙软件?
我怀疑/etc/profile , ~/.bash_profile , ~/.bash_login , ~/.profile , /etc/profile /etc/bash.bashrc或~/.bashrc中的某个内容是错误地执行了$HOSTNAME作为命令,或者`hostname`或$(hostname) 。 单独寻找其中一行(或内部(一组额外的)反引号或$() )。 如果是这样的话,我不知道为什么在一台客户端计算机上这样做,而不是为了安装Java。