返回顶部

ssh命令行指定用户端口连接

ssh命令行指定用户端口连接

ssh指定用户端口连接

复制代码
ssh wei@10.0.0.127 -p 2204

#ssh参数如下
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]
复制代码

 

 

xshell用ssh指定用户和端口连接报“Invalid port number.”

xshell指定用户和端口报错,会发现包端口号阻止,其实是xshell对ssh命令进行封装将-p选项进行优化,

$ ssh wei@10.0.0.127 -p 2204
Invalid port number.

 

 xshell正确连接

ssh wei@10.0.0.127  2204

 分析:

1、查看IP和port是否通信正常

2、检查防火墙及其他安全策略

3、若上面都是正常,则需要从xshell进行对比验证

4、查看xshell帮助文档

5、根据报错Google问题

 

posted @   九尾cat  阅读(2796)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
历史上的今天:
2020-05-28 改网卡名centos7、8,恢复传统的网卡命名eth0
2020-05-28 用户命令管理user/add/mod/del/ groupadd/mod/del 相关命令

目录导航

点击右上角即可分享
微信分享提示