reverse-ssh icon indicating copy to clipboard operation
reverse-ssh copied to clipboard

Dial Home with key file

Open rucciva opened this issue 3 years ago • 2 comments

Hi, thanks for making this awesome tools. Would like to use it as a backup ssh on a bare metal that has no remote management interface.

So is there any chance on implementing dial home ssh with support for private key? or any bash trick to read the password from file instead? I'm thinking of starting the command at startup

rucciva avatar Feb 09 '22 09:02 rucciva

Hi @rucciva ,

I did some tests, but before getting too deep into it, I wanted to clarify what exactly your use case is. As I understand you want to start ReverseSSH at startup and let it dial to another machine and open the listener there, right?

I assume you are aware of the option to define the password during compile time. It is not really mentioned on the Readme, but this password (mainly used to authenticate incoming connections), is also send a single time to the remote host, to streamline connection establishment between two identical ReverseSSH binaries.

I would, however, consider this only a workaround for your use-case, as you might want to have different passwords for incoming or outgoing connections.

The generic approach to pipe the password into ReverseSSH does not work, unfortunately.

Thus, my suggestion would be to add an -i flag which can be specified to load a private ssh key to be used while dialing home, similar to default ssh.

I hope that will work for your use-case!

Fahrj avatar Feb 12 '22 20:02 Fahrj

As I understand you want to start ReverseSSH at startup and let it dial to another machine and open the listener there, right?

Yes you're right

It is not really mentioned on the Readme, but this password (mainly used to authenticate incoming connections), is also send a single time to the remote host, to streamline connection establishment between two identical ReverseSSH binaries.

i'm aware of this too, just want to avoid re-compile each time i change a password or each time backup connection to multiple machine with different password required.

Thus, my suggestion would be to add an -i flag which can be specified to load a private ssh key to be used while dialing home, similar to default ssh.

This will definitely work in my case. Thank you

rucciva avatar Feb 14 '22 01:02 rucciva