1
0
Fork 0

Add ssh command generator

timestamps
dump_stack() 2018-11-25 14:44:14 +00:00
parent 6d7f6c5435
commit 29dbe09a94
1 changed files with 10 additions and 0 deletions

View File

@ -350,3 +350,13 @@ func (q *QemuSystem) Debug(conn string) {
q.debug = true
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
}