0
I routinely open an SSH tunnel to access a service running on a remote machine:
/usr/bin/ssh -L portA:localhost:portB remote.host.com -N &
. The problem I'm facing right now is that unlike usually, I need to access the service as a different user. When I SSH to remote.host.com
and try accessing the service using sudo -u userX localhost:portB
, it works fine as I have permissions over this user.
userX
does not exist on my local machine and I essentially want to be able to access everything I can access on the remote host directly from my local machine. Is there any way to do that ?
PS: I can sudo as userX
but don't have their password (and shouldn't have it). I'd like to be more accurate but my understanding of Linux permission model is a bit fuzzy in all fairness.
Can you connect with userX@remote.host.com? – doriclazar – 2017-07-19T21:52:32.060
When I try, I'm asked to provide the password of the user, which I don't have. I can only sudo as the user once I connected to the host as myself. – Dici – 2017-07-19T21:54:22.203