There is a gem for Ruby for using SSH2, called net-ssh: http://rubygems.org/gems/net-ssh Select a version from http://net-ssh.rubyforge.org/ (1.x or 2.x) to view documentation.
How can my RoR application get system information (such as df or top) from another server?
-
15-10-2022 - |
题
I'm trying to find a way to have my RoR application to get system information. Kind of like if I could ssh into the server and do a df and get the response. Same with doing a top command. How would I go about doing this? I could have a database of server IP's and a username/password for a user who would have the ability to do a df/top command. What's the best way of doing this?
解决方案
不隶属于 StackOverflow