Hello all.
I''m new to the list, ruby and Net::SSH.
I''m learning ruby, my desktop is Linux and one of my pet peeves is the
management and distrobution of passwordless logins.
So I thought I''d bite off this project to help me learn and solve an
annoyence all in one.
That is where I stumbled across Net::SSH.
I have a test script that I was able to transfer a ssh keyfile.
I do have servers that use a non-standard ssh port.
herein seems to ly my dilemma.
I have a host, port, user and mypass variable defined and when I use the
port variable it won''t work.
If I type the port number in the appropriate spot it seems to work but
not with my pre-defined variable.
Any ideas how I can overcome this?
''Am I doing something wrong?
This works.
Net::SSH.start(host,user,mypass) do |session|
session.sftp.connect do |sftp|
sftp.put_file("/home/djash/djash-key.pub",
"djash-key.pub")
end
end
This works
Net::SSH.start(host,23,user,mypass) do |session|
session.sftp.connect do |sftp|
sftp.put_file("/home/djash/djash-key.pub",
"djash-key.pub")
end
end
This don''t.
Net::SSH.start(host,port,user,mypass) do |session|
session.sftp.connect do |sftp|
sftp.put_file("/home/djash/djash-key.pub",
"djash-key.pub")
end
end
--
Regards
Dave Ashmore
SOHO IT Solutions llc
1934 S. Delaware Dr.
Easton, PA 18042
610-258-7128
http://callsohoit.com
Sometimes I can be reached via Skype as djash34
Disclaimer: The below quote is randomly generated and I may or
may not agree with the quote.
################################################################
One man''s "magic" is another man''s engineering.
"Supernatural" is a null word.
-- Robert Heinlein
################################################################