You are not logged in.

#1 2021-03-19 11:49:15

camosoul
Member
Registered: 2020-11-01
Posts: 24

reverse ssh tunnel with sshpass

It used to be so easy to find answers online...

Want to create a system service that automates a reverse ssh tunnel for port 80 and 443.

Cannot use ssh keys. Password only.

(Setting up a user for autossh/keyfile is self-contradicting. A system user with no home directory will have nowhere to store the key. So, even if the keyfile option were possible, it makes no sense and can't be done.)

I can find info on autossh.

I can find info on sshpass.

But, never both at the same time.

I currently have a shell script that I have to manually execute... If the tunnel breaks, it doesn't report and just stays dead until I notice... I'd like to do something more intelligent...

Any ideas?

Offline

#2 2021-03-19 12:30:14

ponyrider
Member
Registered: 2014-11-18
Posts: 112

Re: reverse ssh tunnel with sshpass

You're thinking about it wrong. You can make a systemd user service in your home directory, or a system wide service in /etc/systemd. You SHOULD use an identity key

Offline

Board footer

Powered by FluxBB