Fix port error
This commit is contained in:
2
main.go
2
main.go
@@ -158,7 +158,7 @@ func handleChannel(channel ssh.Channel, requests <-chan *ssh.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func runCommand(channel ssh.Channel, command string) {
|
func runCommand(channel ssh.Channel, command string) {
|
||||||
cmd := exec.Command("/bin/bash", "-c", command)
|
cmd := exec.Command("/bin/sh", "-c", command)
|
||||||
cmd.Env = []string{"PATH=/bin"}
|
cmd.Env = []string{"PATH=/bin"}
|
||||||
cmd.Dir = "/"
|
cmd.Dir = "/"
|
||||||
stdin, err := cmd.StdinPipe()
|
stdin, err := cmd.StdinPipe()
|
||||||
|
|||||||
Reference in New Issue
Block a user