1
0

Add ssh command generator

This commit is contained in:
dump_stack() 2018-11-25 14:44:14 +00:00
parent 6d7f6c5435
commit 29dbe09a94

View File

@ -350,3 +350,13 @@ func (q *QemuSystem) Debug(conn string) {
q.debug = true q.debug = true
q.gdb = conn q.gdb = conn
} }
func (q QemuSystem) GetSshCommand() (cmd string) {
addrPort := strings.Split(q.sshAddrPort, ":")
addr := addrPort[0]
port := addrPort[1]
cmd = "ssh -o StrictHostKeyChecking=no"
cmd += " -p " + port + " root@" + addr
return
}