Skip to content

Conversation

@ss-rstocchi
Copy link

Summary

Added SFTP support to Gatus. We were in need of the ability to check for files on an SFTP server without TTY. When trying with the original SSH method an error would occur that no TTY was available.

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

@TwiN
Copy link
Owner

TwiN commented Dec 22, 2025

When trying with the original SSH method an error would occur that no TTY was available

Does this occur before, or after the authentication has succeeded? Because if it occurs after the authentication succeeded, it may be possible to just have the code that verifies SSH also handle endpoints prefixed with sftp:// by passing a flag that marks the no TTY was available as a success, as opposed to introducing an additional dependency

@ss-rstocchi
Copy link
Author

@TwiN I don't recall. After the holidays I'll give it a shot and adjust the PR accordingly. In the meantime Happy Holidays!

@ss-rstocchi
Copy link
Author

ss-rstocchi commented Jan 2, 2026

@TwiN

Good morning. I've attempted to just allow for sftp:// for ssh in endpoint.go:

image

This allows a connection for SFTP without shell to happen but I cannot run any commands using:

body: | { "command": "ls -la /test" }

And picking it up in the body. I think this is because it's attempting to run commands as a shell when we don't have a shell or shell is disallowed in SFTP?

So allowing for sftp:// would work if we want to only monitor if SFTP without shell (or disallowed shell) is able to be connected to but not for checking files within any directories on the SFTP server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants