• temporarily disable StrictHostChecking an allow passwordauth via ke

    From NiYa193@21:1/5 to All on Fri Jul 10 05:11:42 2020
    在 2009年6月4日星期四 UTC+8上午12:30:38,Darren Dunham写道:
    peter pilsl <pilsl@goldfisch.at> wrote:
    I tried:

    ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication yes" root@vmhost.local

    but it doesnt work:

    Offending key in /home/peter/.ssh/known_hosts:10
    Password authentication is disabled to avoid man-in-the-middle attacks. Keyboard-interactive authentication is disabled to avoid
    man-in-the-middle attacks.
    Permission denied (publickey,password).

    Right. Because "StrictHostKeyChecking" only affects whether keys are
    added to the known_hosts file. It doesn't affect existing keys.

    And my standard-rescue-disk has ssh enabled but no public key installed.

    any idea?

    Change the known_hosts file temporarily so there is no existing key.

    ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -o
    "PasswordAuthentication yes"

    Or put all that into a config file and use that alternate config file:

    ssh -F insecure_config <temphost>

    If you use a global known_hosts file rather than just the per-user one, you'll need to override it as well.

    --
    Darren

    Thanks.
    This command helps me.
    ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -o "PasswordAuthentication yes"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From William Unruh@21:1/5 to 1556579665@qq.com on Fri Jul 10 15:45:49 2020
    On 2020-07-10, NiYa193 <1556579665@qq.com> wrote:
    在 2009年6月4日星期四 UTC+8上午12:30:38,Darren Dunham写道:
    peter pilsl <pilsl@goldfisch.at> wrote:
    I tried:

    ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication yes"
    root@vmhost.local

    but it doesnt work:

    Offending key in /home/peter/.ssh/known_hosts:10
    Password authentication is disabled to avoid man-in-the-middle attacks.
    Keyboard-interactive authentication is disabled to avoid
    man-in-the-middle attacks.
    Permission denied (publickey,password).

    Right. Because "StrictHostKeyChecking" only affects whether keys are
    added to the known_hosts file. It doesn't affect existing keys.

    And my standard-rescue-disk has ssh enabled but no public key installed. >> >
    any idea?

    Change the known_hosts file temporarily so there is no existing key.

    ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -o
    "PasswordAuthentication yes"

    Or put all that into a config file and use that alternate config file:

    ssh -F insecure_config <temphost>

    If you use a global known_hosts file rather than just the per-user one,
    you'll need to override it as well.

    Or you can erase line 10 of the knownhosts file. It is probable that the destination changed their ssh credentials and ths the problem If you
    know they have not, then this is probably a man-in-the-middle attack and
    you just gave away your password to an attacker.



    --
    Darren

    Thanks.
    This command helps me.
    ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" -o "PasswordAuthentication yes"

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)