=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sshd.8,v retrieving revision 1.301 retrieving revision 1.302 diff -u -r1.301 -r1.302 --- src/usr.bin/ssh/sshd.8 2018/06/07 11:26:14 1.301 +++ src/usr.bin/ssh/sshd.8 2018/06/19 02:59:41 1.302 @@ -33,8 +33,8 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $OpenBSD: sshd.8,v 1.301 2018/06/07 11:26:14 jmc Exp $ -.Dd $Mdocdate: June 7 2018 $ +.\" $OpenBSD: sshd.8,v 1.302 2018/06/19 02:59:41 djm Exp $ +.Dd $Mdocdate: June 19 2018 $ .Dt SSHD 8 .Os .Sh NAME @@ -527,11 +527,11 @@ .It Cm no-X11-forwarding Forbids X11 forwarding when this key is used for authentication. Any X11 forward requests by the client will return an error. -.It Cm permitlisten="host:port" +.It Cm permitlisten="[host:]port" Limit remote port forwarding with the .Xr ssh 1 .Fl R -option such that it may only listen on the specified host and port. +option such that it may only listen on the specified host (optional) and port. IPv6 addresses can be specified by enclosing the address in square brackets. Multiple .Cm permitlisten @@ -544,6 +544,15 @@ Note that the setting of .Cm GatewayPorts may further restrict listen addresses. +Note that +.Xr ssh 1 +will send a hostname of +.Dq localhost +if a listen host was not specified when the forwarding was requested, and +that his name is treated differently to the explicit localhost addresses +.Dq 127.0.0.1 +and +.Dq ::1 . .It Cm permitopen="host:port" Limit local port forwarding with the .Xr ssh 1 @@ -611,6 +620,8 @@ command="dump /home",no-pty,no-port-forwarding ssh-dss AAAAC3...51R== example.net permitopen="192.0.2.1:80",permitopen="192.0.2.2:25" ssh-dss +AAAAB5...21S== +permitlisten="localhost:8080",permitopen="localhost:22000" ssh-dss AAAAB5...21S== tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAA...== jane@example.net