diff options
author | Joe <rbo@gmx.us> | 2023-12-15 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2023-12-15 20:20:20 +0100 |
commit | d52d1c7ae62bb5834ae5bbd0ccbf6e87f5eb7ffb (patch) | |
tree | 3393fc7a1567819023af01468a4daa6d726c1bb5 /c_josh.go | |
parent | cool (diff) | |
download | hardflip-d52d1c7ae62bb5834ae5bbd0ccbf6e87f5eb7ffb.tar.gz hardflip-d52d1c7ae62bb5834ae5bbd0ccbf6e87f5eb7ffb.tar.bz2 hardflip-d52d1c7ae62bb5834ae5bbd0ccbf6e87f5eb7ffb.tar.xz hardflip-d52d1c7ae62bb5834ae5bbd0ccbf6e87f5eb7ffb.tar.zst hardflip-d52d1c7ae62bb5834ae5bbd0ccbf6e87f5eb7ffb.zip |
yeye
Diffstat (limited to '')
-rw-r--r-- | c_josh.go | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -47,7 +47,12 @@ package main -import "fmt" +import ( + "fmt" + "os" + "os/exec" + "strconv" +) func display_servers(lhost *HostList) { curr := lhost.head @@ -55,6 +60,14 @@ func display_servers(lhost *HostList) { fmt.Println(curr.ID, curr.Folder + curr.Name) curr = curr.next } + fmt.Println() + curr = lhost.head + fmt.Println ("ssh", "-i", curr.Priv, "-p", strconv.Itoa(int(curr.Port)), curr.User + "@" + curr.Host) + cmd := exec.Command("ssh", "-i", curr.Priv, "-p", strconv.Itoa(int(curr.Port)), curr.User + "@" + curr.Host) + cmd.Stdin = os.Stdin + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + cmd.Run() } func main() { |