I am trying to create a program using ruby (and Net :: SSH) to connect to servers and perform some tasks. Server details should be provided as something like:
ssh://user:pass@host:port (for a host that does not yet have SSH keys)
or
user@host
Net :: SSH expects the following format:
Net::SSH.start('host', 'user', :password => "password")
Is there any gem / stdlib that can handle the url in this format? Or a simple regular expression that can match different parts?
Note. I know and use capistrano, but in this case I need a lower level of control.
source
share