【问题标题】:ssh using @ without a usernamessh 使用 @ 没有用户名
【发布时间】:2019-10-10 03:52:24
【问题描述】:

我正在通过以下指南进行一些设置,

https://www.ovirt.org/develop/dev-process/working-with-gerrit.html

有一个步骤可以验证 ssh 配置,但它涉及到

ssh @gerrit.ovirt.org

这看起来像是一个错字,我们不需要 @ 部分的用户。如果没有用户,没有@是我的理解?

[root@dub-svrfarm27 ~]# ssh @gerrit.ovirt.org
usage: ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
          [-D [bind_address:]port] [-E log_file] [-e escape_char]
          [-F configfile] [-I pkcs11] [-i identity_file]
          [-J [user@]host[:port]] [-L address] [-l login_name] [-m mac_spec]
          [-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address]
          [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]]
          [user@]hostname [command]

话虽这么说...我的 id_rsa.pub 的最后一点有这个

71MgP8w== root@

所以也许有办法解决这个问题,我不确定。

【问题讨论】:

  • 你应该是对的...... ssh 不应该那样工作......
  • 公钥文件的最后部分是注释,仅此而已。

标签: ssh ovirt ssh-config


【解决方案1】:

这是一个错字。再看用法信息:

[user@]hostname

@ 合法当且仅当除了所需的主机名之外还提供了用户名。

【讨论】:

  • 谢谢,我删除了 @ 并能够继续。非常感谢
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-01-28
  • 1970-01-01
  • 2017-01-16
  • 2018-05-19
  • 1970-01-01
  • 2020-02-22
相关资源
最近更新 更多