Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Mar 2023 10:19:46 GMT
From:      Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>
To:        doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org
Subject:   git: bb022d98ed - main - Security Handbook Chapter - Stop using -2 argument in ssh(1)
Message-ID:  <202303051019.325AJk9I038419@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by carlavilla:

URL: https://cgit.FreeBSD.org/doc/commit/?id=bb022d98edf57003f5bb6519b49ba95f6c2e408f

commit bb022d98edf57003f5bb6519b49ba95f6c2e408f
Author:     Tom Hukins <tom@FreeBSD.org>
AuthorDate: 2023-03-05 10:17:41 +0000
Commit:     Sergio Carlavilla Delgado <carlavilla@FreeBSD.org>
CommitDate: 2023-03-05 10:17:41 +0000

    Security Handbook Chapter - Stop using -2 argument in ssh(1)
    
    Pull Request:   https://github.com/freebsd/freebsd-doc/pull/118
---
 documentation/content/en/books/handbook/security/_index.adoc | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/documentation/content/en/books/handbook/security/_index.adoc b/documentation/content/en/books/handbook/security/_index.adoc
index 13aea12147..0185fea3b4 100644
--- a/documentation/content/en/books/handbook/security/_index.adoc
+++ b/documentation/content/en/books/handbook/security/_index.adoc
@@ -1747,15 +1747,12 @@ The following command tells `ssh` to create a tunnel for telnet:
 
 [source,shell]
 ....
-% ssh -2 -N -f -L 5023:localhost:23 user@foo.example.com
+% ssh -N -f -L 5023:localhost:23 user@foo.example.com
 %
 ....
 
 This example uses the following options:
 
-`-2`::
-Forces `ssh` to use version 2 to connect to the server.
-
 `-N`::
 Indicates no command, or tunnel only.
 If omitted, `ssh` initiates a normal session.
@@ -1782,7 +1779,7 @@ This method can be used to wrap any number of insecure TCP protocols such as SMT
 
 [source,shell]
 ....
-% ssh -2 -N -f -L 5025:localhost:25 user@mailserver.example.com
+% ssh -N -f -L 5025:localhost:25 user@mailserver.example.com
 user@mailserver.example.com's password: *****
 % telnet localhost 5025
 Trying 127.0.0.1...
@@ -1803,7 +1800,7 @@ To check email in a secure manner, create an SSH connection to the SSH server an
 
 [source,shell]
 ....
-% ssh -2 -N -f -L 2110:mail.example.com:110 user@ssh-server.example.com
+% ssh -N -f -L 2110:mail.example.com:110 user@ssh-server.example.com
 user@ssh-server.example.com's password: ******
 ....
 
@@ -1822,7 +1819,7 @@ The solution is to create an SSH connection to a machine outside of the network'
 
 [source,shell]
 ....
-% ssh -2 -N -f -L 8888:music.example.com:8000 user@unfirewalled-system.example.org
+% ssh -N -f -L 8888:music.example.com:8000 user@unfirewalled-system.example.org
 user@unfirewalled-system.example.org's password: *******
 ....
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303051019.325AJk9I038419>