码迷,mamicode.com
首页 > 其他好文 > 详细

ssh修改默认端口号后无法连接(提示ssh: Could not resolve hostname)

时间:2020-03-18 13:20:04      阅读:1904      评论:0      收藏:0      [点我收藏+]

标签:提示   comm   cap   interface   ati   ssh   cipher   sage   strong   

ssh命令语法:
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
[-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]] destination [command]
本地修改端口后无法连接ssh
C:\Users\jition>ssh jition@127.0.0.1:2222
ssh: Could not resolve hostname 127.0.0.1:2222: \262\273\326\252\265\300\325\342\321\371\265\304\326\367\273\372\241\243

解决方法:

    使用指定端口号登录(-l 表示login_name -p 表示端口号)

[cqs@centos7 ~]$ ssh -l jition 192.168.1.105 -p 2222

The authenticity of host ‘[192.168.1.110]:2222 ([192.168.1.110]:2222)‘ can‘t be established.
ECDSA key fingerprint is SHA256:Tui3jBxEkVlIvIlMGbv2SoijP9xP4bPflwoUPV+gX4o.
Are you sure you want to continue connecting (yes/no)? no

ssh修改默认端口号后无法连接(提示ssh: Could not resolve hostname)

标签:提示   comm   cap   interface   ati   ssh   cipher   sage   strong   

原文地址:https://blog.51cto.com/1929297/2479554

(0)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!