I have a setting where only scp connections are allowed to a remote server, with ssh login being disabled (i.e. you can't get a shell into that server), and I am seeking a clean way to test the connectivity without transferring an actual file.
The reason for this is that the server is configured to trigger some events upon the reception of new files on users' home directories. Thus, I would like to avoid triggering such events when running connectivity tests.
I will post my workaround as an answer (in case it's helpful for anyone else) but I am looking for cleaner solutions that I haven't thought of.
PS. This question has been previously asked in Unix and Linux forum but hasn't been answered.
/etc/fstabor/etc/issue.