I am trying to determine the user port for ssh connection using Net :: SCP, but so far no luck.
Here is an example of how I am trying to download a remote file from the server using the user ssh port:
require "rubygems" require 'net/scp' Net::SCP.download!("www.server.com", "user", "/opt/platform/upload/projects/file.txt", "/tmp/bb.pdf",{:password => "mypassword",:port => 22202})
The error message I get is:
Errno::ECONNREFUSED: Connection refused - connect(2)
There are no ssh connection entries in the server logs, so I assume that Net :: SCP is not using my user port.
Any tips for me?
Regards, Alex
ruby ssh port
ghostrifle
source share