Disabling pubkey.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 13 Dec 2019 00:16:26 +0200
changeset 2397 320b2c43529b
parent 2396 f6aa28b6c706
child 2398 ac2b5bc2f2c1
Disabling pubkey.
ssh.rst
--- a/ssh.rst	Wed Dec 11 01:05:09 2019 +0200
+++ b/ssh.rst	Fri Dec 13 00:16:26 2019 +0200
@@ -12,8 +12,8 @@
 
   $ ssh -vvv ...
 
-Maintaining key pair.
-=====================
+Maintaining key pair
+====================
 
 Check available key types::
 
@@ -32,8 +32,8 @@
   $ ssh-keygen -p -N "newphrase" -P "oldphrase" -f ~/.ssh/id_dsa
                                      # change passphrase of priv key
 
-Coping and deleting public keys.
-================================
+Coping and deleting public keys
+===============================
 
 To copy your public key to remote host (for automatic login by pubkey
 authentication)::
@@ -49,6 +49,12 @@
   $ ssh-keygen -R hostname
   $ ssh-keygen -R hostname -f ~/.ssh/known_hosts
 
+Disabling pubkey
+================
+::
+
+  ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no user@host
+
 Shell login.
 ============
 ::
@@ -63,8 +69,8 @@
   $ ssh -l $user $host
   $ ssh -l $user $host:$port
 
-X11 forwarding.
-===============
+X11 forwarding
+==============
 
 Enable X11 forwarding on remote host in ``~/.ssh/config`` or ``/etc/ssh_config``::
 
@@ -83,14 +89,14 @@
 http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-ssh-no-x11forwarding
   X11Forwarding does not work with OpenSSH under Cygwin
 
-Multiply private keys.
-======================
+Multiply private keys
+=====================
 
-ssh try use all listen keys::
+``ssh`` tries to use all provided keys::
 
   $ ssh -i ./priv1 -i ./priv2 $user@$host
 
-or place in ~/.ssh/config::
+Alternatively place them to ``~/.ssh/config``::
 
   Host *
   IdentityFile ~/.ssh/identity # standard search path for protocol ver. 1
@@ -110,8 +116,8 @@
   User admin
   IdentifyFile ~/.ssh/admin_priv_dsa
 
-Installing sshd on Cygwin.
-==========================
+Installing sshd on Cygwin
+=========================
 
 * Install base packages and openssh.
 * Create Windows user and set its password.