使用ssh转发unix数据报套接字?

问题描述 投票:0回答:1

是否可以使用ssh转发数据报套接字?似乎默认行为是转发或创建流套接字。我试图用python写入远程unix数据报套接字。试图使用ssh转发套接字,所以我可以用python本地写....这可行,但似乎只适用于流套接字:(

sockets ssh datagram tunnel
1个回答
0
投票

你有一个例子:https://stackpointer.io/network/ssh-port-forwarding-tcp-udp/365/基于ssh + socat

  1. 做你的ssh端口重定向,如:ssh -L 8000:127.0.0.1:8000 user@server01
  2. 运行socat将UDP传输到TCP端口8000:socat -T15 udp4-recvfrom:53000,reuseaddr,fork tcp:localhost:8000

然后这篇文章谈到了我从未听说过的ssfhttps://securesocketfunneling.github.io/ssf/),但声称要同时进行UDP和TCP重定向,这对你来说可能是另一个想法。

© www.soinside.com 2019 - 2024. All rights reserved.