I have a server which I access over ssh with pubkey-authentication like so:
ssh "Host" -l "my identity" This works very well. However, I cant do port redirection and identification with my private key in one command (this is what I tried):
ssh "Host" -L 127.0.0.1:19000:"Host":445 -l "my identity" ssh then asks for the password for the user "my Identity"@"Host", which of course I don't have, because I want to connect with my private key (I tried the password which the private key is encrypted with - it didn't work).
It however works when I first create a normal ssh tunnel and then a second one with the port redirection.
So my question in short: How can i authenticate with my private key AND do a port redirection in one command?