Created
September 15, 2011 21:48
-
-
Save bradland/1220592 to your computer and use it in GitHub Desktop.
Net::SCP chokes on 'tilde' home dir shortcut
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/scp' | |
Net::SCP.start("10.0.38.110", "root") do |scp| | |
# synchronous (blocking) upload; call blocks until upload completes | |
scp.upload! "./test.txt", "~/" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myuser@macbookpro:~/Code/net-ssh-tests$ ruby netscp.rb | |
/Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-scp-1.0.4/lib/net/scp.rb:352:in `block (3 levels) in start_command': SCP did not finish successfully (1) (Net::SCP::Error) | |
from /Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-ssh-2.2.1/lib/net/ssh/connection/channel.rb:590:in `call' | |
from /Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-ssh-2.2.1/lib/net/ssh/connection/channel.rb:590:in `do_close' | |
from /Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:576:in `channel_close' | |
from /Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:456:in `dispatch_incoming_packets' | |
from /Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:213:in `preprocess' | |
from /Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:197:in `process' | |
from /Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:161:in `block in loop' | |
from /Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:161:in `loop' | |
from /Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:161:in `loop' | |
from /Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-ssh-2.2.1/lib/net/ssh/connection/session.rb:110:in `close' | |
from /Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-scp-1.0.4/lib/net/scp.rb:205:in `ensure in start' | |
from /Users/myuser/.rvm/gems/ruby-1.9.2-p290@net-ssh-test/gems/net-scp-1.0.4/lib/net/scp.rb:205:in `start' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
check write permission on this directory.