ssh-srv-wrapper is bash shell script which tries to find a SSH SRV record for the first host and uses what is found rather than what was passed (if a valid record is found).
Run the script directly or feel free to rename or symlink to the name ssh. It will look for another ssh in your path to execute.
- Validate host found in DNS. Potential security risk if DNS server returned shell esacpe sequences, etc.
- Fork the project.
- Make your feature addition or bug fix.
- Send me a pull request -- not sure if that will work in a Gist...
Released into the public domain.
Just made a fork https://gist.github.com/slbmeh/5206bf9b4bf0c381017d that removes all equivalent paths for cases where the script resolves to twice in path e.g.
~/bin
and./bin
if you execute it from your home directory.Should probably just get rid of the if condition completely. Not certain.