dssh

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: MulanPSL-2.0 Imports: 5 Imported by: 0

README

用ssh建立隧道

1,建立从远程到本地 2,建立从本地到远程

注意若想通过远程转发实现内网穿透的功能

需要修改服务器上的配置文件:/etc/ssh/sshd_config

需要修改的配置项: GatewayPorts =yes

如果不修改,只能在远程服务器上访问到隧道

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tunnel

func Tunnel(username string, password string, serverAddr string, remoteAddr string, localAddr string)

username: 用户名 password: 密码 serverAddr: 服务器地址 remoteAddr: 远程地址 localAddr: 本地地址

建立一条从本地到服务器的隧道

func TunnelRemote

func TunnelRemote(username string, password string, serverAddr string, remoteAddr string, localAddr string)

远程转发

username: 用户名 password: 密码 serverAddr: 服务器地址 remoteAddr: 远程地址 localAddr: 本地地址

建立一条从服务器到本地的远程转发

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL