0

I am trying to set up an alias in my config that should give the same result as

ssh -N -L 3307:1.1.1.1:3306 username@remoteip

My current .ssh/config looks something like this.

Host connect
    User username
    HostName remoteip
    port 22
    LocalForward 3307 1.1.1.1:3306

What do I put in the above config to not start a shell?

Host connect
    User username
    HostName remoteip
    port 22
    LocalForward 3307 1.1.1.1:3306
    SessionType none

sessiontype just gives Bad configuration option: sessiontype even though its documented on manual for ssh options

Prajwal Raju P
  • 180
  • 1
  • 3
  • 12

1 Answers1

1

What version of SSH are you using (ssh -V)?

From the release notes it looks like this feature was only added in version 8.7 released in August last year. Maybe updating SSH might solve your problem?

drlim2u
  • 26
  • 1
  • For clarity, the `SessionType` option is new, while the `-N` flag has been there for a while. You are likely to have a version of ssh that supports `-N` but not `SessionType`. – spazm Feb 05 '22 at 02:36
  • Thanks for the tip @drlim2u. I didn't realize I needed to update my ssh, 8.4p1 is from 24 Aug 2021, but that date was just when the security patch was applied. 8.4 is from 2019. – spazm Feb 05 '22 at 02:39