git: bb022d98ed - main - Security Handbook Chapter - Stop using -2 argument in ssh(1)

Sergio Carlavilla Delgado <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by carlavilla:

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

commit bb022d98edf57003f5bb6519b49ba95f6c2e408f
Author:     Tom Hukins <[email protected]>
AuthorDate: 2023-03-05 10:17:41 +0000
Commit:     Sergio Carlavilla Delgado <[email protected]>
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 [email protected]
+% ssh -N -f -L 5023:localhost:23 [email protected]
 %
 ....
 
 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 [email protected]
+% ssh -N -f -L 5025:localhost:25 [email protected]
 [email protected]'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 [email protected]
+% ssh -N -f -L 2110:mail.example.com:110 [email protected]
 [email protected]'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 [email protected]
+% ssh -N -f -L 8888:music.example.com:8000 [email protected]
 [email protected]'s password: *******
 ....
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.