From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14913 invoked from network); 25 Sep 2001 03:03:36 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Sep 2001 03:03:36 -0000 Received: (qmail 25194 invoked by alias); 25 Sep 2001 03:03:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15866 Received: (qmail 25182 invoked from network); 25 Sep 2001 03:03:25 -0000 Date: Mon, 24 Sep 2001 23:03:23 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Subject: PATCH: ssh protocol v2 ciphers &c. Message-ID: <20010924230323.A13121@dman.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i 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@lysator.liu.se' && 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 \