Машины DOS вводят возврат каретки в конце строк (eol), он должен быть похожим на это в vi ^M
.
Попытайтесь выполнить это:
:%s/^M//g
Если обе системы имеют открытый ключ Вашего локального системного использования -A
.
От ssh(1)
-A Enables forwarding of the authentication agent connection. This can also be specified on a per-host basis in a configuration file.
Также знайте об этом предупреждении:
Agent forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the agent's UNIX-domain socket) can access the local agent through the forwarded connection. An attacker cannot obtain key material from the agent, however they can perform operations on the keys that enable them to authenticate using the identities loaded into the agent.
Результат состоит в том что, когда Вы автор против второго хоста автор передаетесь полностью назад хосту, где Вы физически находитесь.
Пример:
me@host0:~ $ ssh -A host1
Last login: Thu Jun 14 11:31:53 2012 from 2001:db8::b0
me@host1:~ $ ssh -A host2
Last login: Thu Jun 14 11:41:05 2012 from 2001:db8::b1
me@host3:~ $ ssh -A host3
Last login: Tue Jun 12 10:46:50 2012 from 2001:db8::b2
me@host3:~ $
Ваш агент не может передать аутентификацию на удаленный компьютер. Можно портировать вперед соединение для соединения непосредственно с удаленной машиной, если Вы хотели бы.
См. эту статью о мультитранзитном участке SSH и пропуске к разделу о ProxyCommand
в ~/.ssh/config
:
Host remotecomputername
ProxyCommand ssh -q remoteservername nc -q0 remotecomputername 22