net-ssh / net-scp

Pure Ruby implementation of the SCP protocol
http://github.com/delano/net-scp
MIT License
152 stars 62 forks source link

Unable to use SCP for locations with spaces in windows #57

Open saumy4all opened 2 years ago

saumy4all commented 2 years ago

connection=Net::SSH.start('10.102.1.1', "Administrator", password: "Password", timeout: 30) connection.scp.download!('C:/Test Folder/Package Solutions/general.log','C:/RemoteLogs')

Traceback (most recent call last): 16: from (irb):8:in rescue in irb_binding' 15: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-scp-3.0.0/lib/net/scp.rb:321:indownload!' 14: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/channel.rb:272:in wait' 13: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:180:inloop' 12: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:180:in loop' 11: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:180:inblock in loop' 10: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:227:in process' 9: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/event_loop.rb:28:inprocess' 8: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/event_loop.rb:100:in ev_preprocess' 7: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/event_loop.rb:100:ineach' 6: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:248:in ev_preprocess' 5: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:548:indispatch_incoming_packets' 4: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:685:in channel_close' 3: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/session.rb:572:inchannel_closed' 2: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-ssh-6.1.0/lib/net/ssh/connection/channel.rb:611:in do_close' 1: from C:/Ruby26/lib/ruby/gems/2.6.0/gems/net-scp-3.0.0/lib/net/scp.rb:365:inblock (3 levels) in start_command' Net::SCP::Error (SCP did not finish successfully (1): )