Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: ssh protocol v2 ciphers &c.



This adds completion for -o Ciphers and -o Protocol.  Both are
comma-separated lists.

Apparently the -c is equivalent to -o Cipher= when using proto v1
and -o Ciphers= when using proto v2.  That is, under protocol v2,
-c takes a comma-separated list of v2 ciphers.  I suppose one could
attempt to determine by command-line options, config file
directives, presence of hostnames in .ssh/known_hosts or
.ssh/known_hosts2, or other methods, which protocol version is
more likely, but if Protocol=1,2 or Protocol=2,1, one can't
be certain.  I haven't bothered to try.  Maybe someone has a better
idea.

Index: Completion/Unix/Command/_ssh
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_ssh,v
retrieving revision 1.3
diff -u -r1.3 _ssh
--- Completion/Unix/Command/_ssh	2001/07/24 07:11:34	1.3
+++ Completion/Unix/Command/_ssh	2001/09/25 02:16:03
@@ -67,6 +67,20 @@
           *(#i)(batchmode|compression|fallbacktorsh|forward(agent|x11)|keepalive|passwordauthentication|rhosts(|rsa)authentication|rsaauthentication|usersh|kerberos(authetication|tgtparsing)|useprivileged)*)
 	    _wanted values expl 'truth value' compadd yes no && ret=0
             ;;
+          *(#i)ciphers*)
+            _values -s , 'encryption cipher' \
+		'aes128-cbc' \
+		'3des-cbc' \
+		'blowfish-cbc' \
+		'cast128-cbc' \
+		'arcfour' \
+		'aes192-cbc' \
+		'aes256-cbc' \
+		'rijndael128-cbc' \
+		'rijndael192-cbc' \
+		'rijndael256-cbc' \
+		'rijndael-cbc@xxxxxxxxxxxxxx' && ret=0
+            ;;
           *(#i)cipher*)
 	    _wanted values expl 'encryption cipher' \
                 compadd idea des 3des blowfish arcfour tss none && ret=0
@@ -85,6 +99,11 @@
           *(#i)(local|remote)forward*)
             state=forward
             ;;
+          *(#i)protocol*)
+            _values -s , 'protocol version' \
+		'1' \
+		'2' && ret=0
+	    ;;
           *(#i)proxycommand*)
             compset -q
             shift 1 words
@@ -109,7 +128,7 @@
         else
           _wanted values expl 'configure file option' \
               compadd -M 'm:{a-z}={A-Z}' -S '=' - \
-                  BatchMode ClearAllForwardings Cipher Compression \
+                  BatchMode ClearAllForwardings Cipher Ciphers Compression \
                   CompressionLevel Host ConnectionAttempts EscapeChar \
                   FallBackToRsh ForwardAgent ForwardX11 \
                   GlobalKnownHostsFile HostName IdentityFile KeepAlive \



Messages sorted by: Reverse Date, Date, Thread, Author