Ubuntu 和 Windows Server 2003 的 SCP 不一致(使用 CygWin 1.7.xx)

Ubuntu 和 Windows Server 2003 的 SCP 不一致(使用 CygWin 1.7.xx)

几天前,我能够scp使用 cygwin 从我的 windows server 2003 复制到远程服务器id_rsa,但现在使用它()似乎不起作用。我没有安装或删除任何 cygwin 包。scp (id_rsa.pub location) [email protected]scp

我仍然可以自动使用连接到服务器ssh。在同一台服务器上,同时在其他 Ubuntu 机器上工作,scp并且运行正常。使用命令ssh时它甚至不会提示输入密码。scp

scp -v c:/outfiles/[email protected]:~/temp/headers.csv
Executing: /usr/bin/ssh -x -oClearAllForwardings=yes -n -v -- c scp -v /outfiles/headers.csv [email protected]:~/temp/headers.csv
OpenSSH_6.0p1, OpenSSL 1.0.1c 10 May 2012
debug1: Connecting to c [XXXXXXXXXX] port 22.
debug1: connect to address XXXXXXXXXX port 22: Connection timed out
ssh: connect to host c port 22: Connection timed out 

而 ssh 有以下调试消息:

    $ ssh -v [email protected]
    OpenSSH_6.0p1, OpenSSL 1.0.1c 10 May 2012
    debug1: Connecting to example.com [XXXXXXXXXX] port 22.
    debug1: Connection established.
    debug1: identity file /home/Administrator/.ssh/id_rsa type 1
    debug1: identity file /home/Administrator/.ssh/id_rsa-cert type -1
    debug1: identity file /home/Administrator/.ssh/id_dsa type -1
   debug1: identity file /home/Administrator/.ssh/id_dsa-cert type -1
   debug1: identity file /home/Administrator/.ssh/id_ecdsa type -1
debug1: identity file /home/Administrator/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8p1 Debian-7ubuntu1
debug1: match: OpenSSH_5.8p1 Debian-7ubuntu1 pat OpenSSH_5*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.0
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA (host key XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX)
debug1: Host 'example.com' is known and matches the ECDSA host key.
debug1: Found key in /home/Administrator/.ssh/known_hosts:1
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/Administrator/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to example.com ([xxxxxxxxx]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.

我想在这里补充的另一个问题是:

我可以启动 cron 服务,但 cron 作业不起作用。(ORPHAN)no password set在使用 cronlogs 查询时,我收到 cron 作业的错误提示。我的 Cygwin 设置似乎存在一些问题,但我无法诊断它们。除了在cygwin 常见问题解答谷歌搜索了将近两天,情况仍然一样,卡住了。基本上,我正在尝试使用scp任何其他选项来自动执行文件传输,这很有帮助,我已经卡了很长时间了。

这可能不是一个好主意,但我还是要问这个问题。是否可以怀疑防火墙是导致此问题的原因,如果是,如何验证?我曾在某处读到过,但没有继续读下去,理由是使用相同的端口号 22 成功,这种 netstat理由是合理的,也可能是错误的。ssh

相关内容