force port redirection for list of users

Sudarshan Soma sudarshan12s at gmail.com
Sun Jul 9 02:41:13 AEST 2017


Hi ,
I have the following requirement .
other than following users, any other user sshd connection should be
redirected to 2024 instead of port 22.
root, ftp, guest

So
ssh root at ip // should be sent to sshd  running at port 22
ssh otheruser at ip // should be sent to sshd running at  port  2024


I know that we can do something like this:

ssh -o ProxyCommand='ssh -W localhost:2024 cliuser at ip' otheruser@
<secadmin at 10.220.167.184>ip

will take to otheruser login to port 2024 after sshd_config settings

Match user cliuser

MaxSessions 0

    PermitOpen localhost:2024



This requires long command at the client side . Can this be made simple like


ssh otheruser at ip automatically goes to port 2024 after i make some
redirection at sshd_config



Thanks and Regards,

Sudarshan


More information about the openssh-unix-dev mailing list