Get Files from an SFTP Server
# umh-support
n
I try to collect sample files from a SFTP server into UMH. The handshake fails all the time because of mismatch in host key. What do i need to take care of when creating a bridge with SFTP? Do i need to create a .ssh directory inside the instance container or map it from the host system? Which host key do i need to paste in there? Does it also work automatically?
r
n
Well that's obvious. I checked the host_key in the sshd_config and pasted the raw content of the key into the config. But there's still a mismatch. And also the sftp server allows user/password authentication so i assumed this is also possible because i provided username and password
re-applying config: ReadDFC: Input config differences: - Input.sftp: exists in desired but missing in observed Output config differences: - Output.uns: exists in desired but missing in observed Pipeline config differences: And also: It fails for days already to get the bridge running. I don't really get what's the issue here. I redeployed it many times but still dont get whats the issue
service closing due to: failed to init input path root.input: reading known_hosts file: open /home/umhuser/.ssh/known_hosts: no such file or directory And also this is an obvious error as well. I had to create that directory manually but still it doesnt resolve the error. any ideas?
r
Do you mind sharing the config? With removed credentials ofc. And also the logs
n
I don't. Config: sftp: address: auto_replay_nacks: true credentials: host_public_key: * password: * username: * paths: - /path scanner: to_the_end: {} watcher: cache: "" enabled: true minimum_age: 1s poll_interval: 1s
r
I do not have time to check this until earliest end of week, but i will get back to you unless one of my colleagues check it before me.
i tested this now against a public sftp server. i wrote a guide how to use it.
Now there is a bridge template for this and i made a blog article about this: https://www.umh.app/insight/reading-files-from-sftp-into-the-uns-and-the-host-key-error-that-breaks-the-first-try
6 Views