Skip to content

leeisman/ssh_tunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example

在執行的路徑放置ssh.yaml

package main

import (
	"fmt"
	"github.com/leeisman/ssh_tunnel"
	"os"
	"time"
)

func main() {
	ssh_tunnel.TunnelByConf(getWorkingDirPath())
	time.Sleep(time.Second * 1000)
}

func getWorkingDirPath() string {
	dir, err := os.Getwd()
	if err != nil {
		panic(err)
	}
	fmt.Println("workingDirPath:", dir)
	return dir
}

ssh yaml

ssh:
  - [ {localPort},"ssh server host",{ssh server port},"remote server host",{remote server port} ]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages