def ssh_connect(ssh_host, ssh_port, web_socket) web_socket.close
how about like this:
cmd="ssh root@#{ssh_host} -p #{ssh_port} -o StrictHostKeyChecking=no" puts cmd exec cmd
Thanks, Yinsi
puts "ssh root@#{ssh_host} -p #{ssh_port} -o StrictHostKeyChecking=no"
exec "ssh-keygen -R #{ssh_host}; ssh root@#{ssh_host} -p #{ssh_port} -o StrictHostKeyChecking=no"
-- 2.23.0