|
|
@ -1,24 +0,0 @@ |
|
|
|
# -*- coding: UTF-8 -*- |
|
|
|
|
|
|
|
from pick import pick |
|
|
|
import sshserver |
|
|
|
|
|
|
|
title = 'Please choose your favorite programming language: ' |
|
|
|
# options = ['quit', 'Java', 'JavaScript', 'Python', 'PHP', 'C++', 'Erlang', 'Haskell'] |
|
|
|
options = ['ckqas:192.168.1.44:22', 'ckqas129:192.168.1.129:22'] |
|
|
|
# option, index = pick(options, title) |
|
|
|
# print(option, index) |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
while True: |
|
|
|
option, index = pick(options, title) |
|
|
|
if option == "quit": |
|
|
|
exit(0) |
|
|
|
|
|
|
|
arr = option.split(":") |
|
|
|
if len(arr) == 3: |
|
|
|
host = arr[1] |
|
|
|
port = int(arr[2]) |
|
|
|
sshserver.NewTerminal(host, port, "daniel") |
|
|
|
|