@ZEAL Blog·厉
WWW Zeal Blog
We stand alone,
TOGETHER.
+ 0 - 0 | §scp Executing ssh1 in compatibility mode failed

执行远程文件复制时提示:

scp: warning: Executing scp1.
scp: FATAL: Executing ssh1 in compatibility mode failed (Check that scp1 is in your PATH).

原因是scp的客户端与服务器端所用的版本不同。最简单的方法是用sftp命令来替代(不过sftp的-P参数不是用来设置ssh端口的,要连接非标准端口服务器的最好统一使用 -o Port=XXXX 参数来设置)。

Quote 1:

This problem is often quite perplexing, since a ssh -V trace may show that you're using SSH-2 - so what is a message about "ssh1 compatibility mode " doing in there?

What's happening is this:

  1. On the OpenSSH client, you run say, scp foo server:bar
  2. scp runs ssh in a subprocess to connnect to the server, and run the remote command scp -t bar. This is intend to start an instance of the scp program on the server, and the two scp's will cooperate by speaking over the SSH connection, to retrieve the file.
  3. ssh connects to the server (using either protocol 1 or 2, it doesn't matter), and runs the remote scp command. However, the "scp" that gets run on the server is the SSH2 scp program (scp2), not the OpenSSH one. The crux of the problem is: besides the name, these two scp's have exactly nothing in common. scp2 cannot speak the file-transfer protocol that OpenSSH scp does. However, scp2 recognizes from the "-t" flag what's expected, and tries exec scp1 to service the connection (this is the extent of SSH2's SSH-1 compatibility; where OpenSSH has code for both protocols in a single set of programs, SSH2 expects to execute programs from a parallel SSH1 installation). It fails (presumably because you don't have SSH1 installed), and reports the problem.

The solution is to install either the OpenSSH or SSH1 version of scp on the server under the name "scp1", somewhere in the sshd2's PATH.

Quote 2:

OpenSSH implements "scp" via RCP over an SSH channel.
ssh.com implement "scp" via FTP over an SSH channel.

OpenSSH's server has both implementations, but it's client only uses the RCP version.

So if the client is OpenSSH, use "sftp" to get to an ssh.com server.

标签 ( 开发/理论 ) :
+ 0 - 0 | §Google Reader的"kept unread"列表清除问题

正常情况下,当在Google Reader里标记文章为"keep unread"后,作用类似 Read it Later 或 Instapaper ,方便事后再去细读。在Google Reader的Home界面会列出你的"Recently kept unread"内容,当你点进去重新阅读之后,该内容就自动标记为已读从该清单消失了。

但在某些情况下,进到kept unread list的内容怎么也没法清除(就我所碰到的,是我曾经对某个feed的文章标记了kept unread,然后在重新阅读之前把这个feed给退订掉了),也看不到keep unread的勾选项。弄来弄去,在Google论坛找到了神人的解决方案

  1. 进到unread list界面;
  2. 把内容加上星标(starred);
  3. 进到starred items界面;
  4. 点开文章,取消"keep unread"的勾选状态;

言而总之,越是陈年老BUG,Google越是不会考虑去修改,忒奇怪了。

标签 ( 网络 ) :
Since 2005.04.27  梦想 就像鸡蛋 要么孵化 要么臭掉RSS Feed (Entries) | About me | Back To Home | @ZEAL | zbird.com | 沪ICP备05024379号