Example #1
0
func main() {
	if len(os.Args) != 2 {
		log.Fatalf("Usage: %s <host>", os.Args[0])
	}
	m2m, err := xrm2m.NewClient(os.Args[1]+":22", xrm2m_util.CredsFromEnv())
	if err != nil {
		log.Fatal("Can't open M2M session: " + err.Error())
	}
	defer m2m.Close()
	fmt.Println("Connection established")
	enter_shell(m2m)
}
Example #2
0
func main() {
	if len(os.Args) != 2 {
		log.Fatalf("Usage: %s <host>", os.Args[0])
	}
	m2m, err := xrm2m.NewClient(os.Args[1]+":22", xrm2m_util.CredsFromEnv())
	if err != nil {
		log.Fatal("Can't create M2M client session: " + err.Error())
	}
	defer m2m.Close()

	enter_shell(m2m)
}