After the user logs out, can copy this printed information to log in again.
Signed-off-by: Wu Zhende wuzhende666@163.com --- lib/monitor.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/monitor.rb b/lib/monitor.rb index 283cd788d..12f5280f3 100755 --- a/lib/monitor.rb +++ b/lib/monitor.rb @@ -87,8 +87,11 @@ class Monitor def ssh_connect(ssh_host, ssh_port, web_socket) web_socket.close
- exec "ssh-keygen -R #{ssh_host}; - ssh root@#{ssh_host} -p #{ssh_port} -o StrictHostKeyChecking=no" + cmd = "ssh root@#{ssh_host} -p #{ssh_port} -o StrictHostKeyChecking=no" + puts cmd + + cmd = "ssh-keygen -R #{ssh_host};" + cmd + exec cmd end
def stop(data, web_socket, code = 1000, reason = 'normal')