generate terminal session id, and tcpserver ip address