Home » Development, LAMP, Open Source, Programming, Technology

Force ssh to use Password instead of Public Key

27 June 2011 22,659 views 8 Comments Permanent Link

Here is what you should pass to ssh so that it doesn’t attempt to authenticate using a Public Key.

ssh -o "PubkeyAuthentication no" user@server

I was getting the following error when trying to login to ssh to a Server.

Received disconnect from <IP>: 2: Too many authentication failures for root

I verbosed to see the errors and got the following:


debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: bijay@bijay
debug1: Authentications that can continue: publickey,password
debug1: Offering RSA public key: bijay@bijay
debug1: Authentications that can continue: publickey,password
debug1: Offering RSA public key: bijay@bijay
debug1: Authentications that can continue: publickey,password
debug1: Offering RSA public key: bijay@bijay
debug1: Authentications that can continue: publickey,password
debug1: Offering RSA public key: bijay@bijay
debug1: Authentications that can continue: publickey,password
debug1: Offering RSA public key: bijay@bijay
Received disconnect from : 2: Too many authentication failures for root

By Default because of the ssh config, it was trying to authenticate using Public Key (pubkey)

pixel Force ssh to use Password instead of Public Key

PR: 0

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
  • http://www.seasonalworld.com/ pool liner

    On the other hand, your pool may be designed for overlap pool liners. These liners are installed by removing the pool's top rail and draping the liner's fabric over the walls. Plastic clips are then used to hold the liner in place along the top of the wall. Once that is done, the top rails are replaced. If there is excess liner hanging down on the outside of the pool walls, it can simply be trimmed off. If your above ground swimming pool is meant to accommodate an overlap liner, you should be able to see the liner hanging down on the outside of the pool if you look under the top rail.

  • http://www.seasonalworld.com/ fiberglass pools

    Beaded liners are installed up the wall of the pool. They snap onto a track or into a liner are placed. These liners go up and past the edge of the pool and hang down. Coping strips can be a flat ribbon type or tube shaped. The overlap liners can be bought in different colors and styles. They are also simple to install and less expensive than others.  When it comes to unibead liners, you use a J-hook liner looking like an upside-down “J” and snaps onto a channel to make these unique liners. They can perform dual type function like an overlap or a beaded liner type perfectly in an above ground pool. Lastly, you can pick on the extended liner. These are tall liners. They are effective as the extra liner for the deeper end of the swimming pool. The pool liners are common in circular above ground swimming pools. They also keep the water from leaking out.

  • BR

    Don’t put the quotes on “PubkeyAuthentication no”

  • BR

    Sorry, the command is correct syntax except there needs to be a space after the ssh. Alternately, you can use PubKeyAthentication=no without quotes.

  • http://bijayrungta.com/ Bijay Rungta aka @rungss

    Yep, You are right. Seems the space was removed when writing this Post, Have fixed that. PubKeyAthentication=no should also work.

  • Matt

    Awesome, thanks.

  • CygwinBlows

    Much appreciated, first Google result. Saved time on more searches

  • Halil Özgür

    While trying, I discovered a shortcut:
    ssh user:@host
    Note the colon, “:”