我觉得自己像一个完整的傻瓜 - 但我似乎无法连接Terminal.app和SSH到非标准的SSH端口。我在山狮上。OSX Terminal.app SSH端口
我已经尝试了所有的以下内容:
$ ssh [email protected] -p 42586
$ ssh [email protected] -p42586
$ ssh -p 42586 [email protected]
$ ssh -p42586 [email protected]
我似乎无法得到正确的语法,以上所有的产生错误。什么是正确的标志顺序?我检查了man
页面,它将它显示在[user] @ [domain]部分的前面,但是,这也会引发错误。
编辑:
的更多信息和原始终端输出:
$ ssh mysite.com -p42586
--hangs--
$ ssh mysite.com -p 42586
--hangs--
$ ssh -p42586 mysite.com
usage: grep [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-e escape_char] [-F configfile]
[-I pkcs11] [-i identity_file]
[-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-R [bind_address:]port:host:hostport] [-S ctl_path]
[-W host:port] [-w local_tun[:remote_tun]]
[[email protected]]hostname [command]
$ ssh -p 42586 mysite.com
usage: grep [-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
/usr/bin/ssh: option requires an argument -- p
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-e escape_char] [-F configfile]
[-I pkcs11] [-i identity_file]
[-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-R [bind_address:]port:host:hostport] [-S ctl_path]
[-W host:port] [-w local_tun[:remote_tun]]
[[email protected]]hostname [command]
实施例1和2挂起,直到超时。 3和4产生一个grep使用回声以及一个ssh使用回声。
编辑2:
感谢您的建议@topguncoder我最初的尝试是冒号符号 - 但产生不同的错误:
$ ssh [email protected]:42586
ssh: Could not resolve hostname mysite:42586: nodename nor servname provided, or not known
不知道这个,但你有没有尝试过: ssh [email protected]:42586 – TopGunCoder
什么是终端错误? –
更新了问题以提供更多信息 – philwinkle