Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Besides the ProxyCommand approach, another way would be to define 'ssh' as a shell alias/function that does the port knocking first and then passes any parameters to the normal /usr/bin/ssh.

Or you could make your own 'ssh' shell script somewhere else on the filesystem that handles it for you.



without making it an alias, would this shell script somewhere else be usable by the other applications from the question? if you can provide the specific path rather than the system looking for whatever ssh was installed, then maybe, but i don't know those specifics which makes using the shell script have question marks.


You could either put the script somewhere earlier within the PATH than wherever the normal ssh binary is, or manually export a new PATH with some other custom folder that comes first, which you could use to override anything, e.g. export PATH=/root/bin:$PATH


You can write a script and put it in PATH




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: