Forum Discussion
9 minutes ago, SmokinIndo said:I just used the asterisks to hide the name of my sftp site. What it actually printed out was the name of the sftp site that I used for the host property. I tried debugging with print statements, and it looks like the code fails at session.connect(). Am I supposed to be using an IP address for the host? Or the actual name? Do I need to make sure something is installed on my collector for the script to make the sftp connection? THanks for your help.
It will use whatever you provide. If it is a name and the collector can resolve the name, then it should work. I just looked at the code and I don't see where it would have emitted sftp:// at all -- that is a URL format and it wants just the hostname (or IP). If you included sftp:// in the hostname, please remove it :).
def session = jsch.getSession(user, host, port.toInteger()); // Get a session session.setPassword(pass) // Set the password to use for the session
Related Content
- 8 months ago
- 9 months ago
- 6 months ago