Skip to content

leeisman/ssh_tunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jul 12, 2022
fe3e63a · Jul 12, 2022

History

8 Commits
May 22, 2021
May 22, 2021
May 22, 2021
May 22, 2021
May 22, 2021
May 22, 2021
Jul 12, 2022
Jul 12, 2022

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