首页 > 其他分享 >ssh登录异常

ssh登录异常

时间:2023-01-18 18:33:34浏览次数:45  
标签:1234 登录 administratively 异常 failed prohibited ssh open

概述

golang实现telnet效果发现ssh异常,在正常的linux是没问题在wsl下提示如下异常

env

  • window11 wsl2.0
  • golang

异常信息

open failed: administratively prohibited: open failed

解决

vim /etc/ssh/sshd_config
# 允许ssh转发tcp端口
AllowTcpForwarding yes

systemctl restart sshd

//ssh端口转发
ssh -L 1234:localhost:1234 [email protected]

[bang@0201221459-NB ~]$ ss -lant |grep 1234
LISTEN 0      128        127.0.0.1:1234       0.0.0.0:*
LISTEN 0      128            [::1]:1234          [::]:*

link

标签:1234,登录,administratively,异常,failed,prohibited,ssh,open
From: https://www.cnblogs.com/xiaochina/p/17019575.html

相关文章