scp 不支持 .ssh/config

scp 不支持 .ssh/config

使用了几年弧形四作为我的 SSH2 连接的默认密码〜/ .ssh /配置文件

host namaka
    hostname localhost
    port 2022
    ciphers arcfour
    IdentityFile ~/.ssh/virtualbox
    compression true
    StrictHostKeyChecking no
    user kermit 

升级到 Debian 8 后,我发现此密码已从默认 ssh 配置中禁用,并且出现以下错误

no matching cipher found: client arcfour server aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],[email protected]

所以我改变了我的〜/ .ssh /配置

host namaka
    hostname localhost
    port 2022
    ciphers aes256-ctr
    IdentityFile ~/.ssh/virtualbox
    compression true
    StrictHostKeyChecking no
    user kermit

(注意密码 aes256)现在我的 ssh 连接再次工作。

kermit@euroforce:~$ ssh kermit@namaka

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Jul 16 00:20:21 2015 from 10.0.2.2
kermit@namaka:~$ 

不幸的是我仍然得到没有匹配的密码当我尝试执行 scp 时出错

kermit@euroforce:~$ scp foo  kermit@namaka:/tmp/
no matching cipher found: client arcfour server aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],[email protected]
lost connection

看来 scp 已在某处缓存了以前的密码并且不想使用新的密码。

从命令行强制密码确实有效

kermit@euroforce:~$ scp -c aes256-ctr foo  kermit@namaka:/tmp/foo2
foo                                                                 100%    0     0.0KB/s   00:00  

强制配置文件不起作用

kermit@euroforce:~$ scp -C .ssh/config foo  kermit@namaka:/tmp/foo2
no matching cipher found: client arcfour server aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],[email protected]
lost connection

有什么线索吗?

答案1

我找到了罪魁祸首:这是我几年前创建的 bash 别名,然后忘记了

alias scp='scp -c arcfour'

我真丢脸

相关内容