net-ssh / net-scp

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

verbose mode #67

Closed 4zv4l closed 1 year ago

4zv4l commented 1 year ago

I can't get the verbose mode to work. I tried with

      ssh.scp.upload!(LOCAL_DIR, REMOTE_DIR, recursive: true, verbose: true ) if action == "give"
      ssh.scp.upload!(LOCAL_DIR, REMOTE_DIR, { recursive: true, verbose: true }) if action == "give"
      ssh.scp.upload!(LOCAL_DIR, REMOTE_DIR, recursive: true, verbose: :debug) if action == "give"
      ssh.scp.upload!(LOCAL_DIR, REMOTE_DIR, { recursive: true, verbose: :debug }) if action == "give"

but none worked and the documentation doesn't seem to show well how to get the output.

mfazekas commented 1 year ago

@4zv4l both ssh.scp.upload!(LOCAL_DIR, REMOTE_DIR, recursive: true, verbose: :debug) and ssh.scp.upload!(LOCAL_DIR, REMOTE_DIR, { recursive: true, verbose: :debug }) should work, they are the same.

However that means we're passing the -v option to the scp command invoked on the server, and not sure how openssl server handles the -v versbose option. Might add some extra log the the server side logs.