<div dir="ltr"><div>I have the following  requirement.</div><div><br></div><div><br></div><div>-> ssh username@ipaddr </div><div>It has to direct the ssh requests to port 2035 on machine with IP , ipaddr</div><div><br></div><div>-> scp username@ipaddr</div><div>It has to direct scp requests to port 2036 on machine with IP, ipaddr</div><div><br></div><div>The reason we want this way is , on machine with IP addr ipaddr, we are listening on 2035 for giving custom login shell.</div><div> on port 2036, we provide scp transfers. </div><div><br></div><div>For this to work, Can  Nginx run on port 22 on machine, ipaddr and add a rule to redirect to different ports based on protocol (ssh or scp) </div><div><br></div><div>After this, can i do the following from my laptop </div><div><br></div><div>ssh username@ipaddr  // gives me custom login shell<br></div><div><br></div><div>scp username@ipaddr // enables scp transfers.<br></div><div><br></div><div><br></div><div>Regards,</div><div>Grover</div></div>