AIX Open Source

power-server-operatingsystems.png

Operating Systems

The core of your mission-critical workloads: AIX, IBM i, and Enterprise Linux

power-ISV-Solutions1.png

ISV Solutions

Stay up to date with key capabilities running on POWER such as SAP

Business Continuity

Learn how to keep critical processes running and adapt quickly with PowerHA

power-infrastructure-security.png

Power Security

Protect your most sensitive data anywhere in your hybrid cloud

Virtualization

Check here for virtualization and management needs: HMC & CMC, PowerVC, and PowerVM

Open Source

Join our open source efforts within the IBM Power Systems portfolio

Enterprise Infrastructure as a Service

Achieve business growth with agility and flexibility with our enterprise IaaS in Power Virtual Server

Programming Languages

The hub for Programming Languages

Expand all | Collapse all

sshpass Problem

  • 1.  sshpass Problem

    Posted Tue March 02, 2021 11:19 AM
    Hello,
    i had installed sshpass-1.06-2.aix6.1.ppc.rpm on AIX 7200-05-01.

    # sshpass -p mypass ssh myuser@foo "date"
    Permission denied, please try again.
    Permission denied, please try again.
    myuser@foo: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).


    Debug output
    sshpass -p mypass ssh -vvv myuser@foo "date"
    <snip>
    debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
    debug1: Trying private key: /.ssh/id_ecdsa
    debug3: no such identity: /.ssh/id_ecdsa: No such file or directory
    debug1: Trying private key: /.ssh/id_ed25519
    debug3: no such identity: /.ssh/id_ed25519: No such file or directory
    debug1: Trying private key: /.ssh/id_xmss
    debug3: no such identity: /.ssh/id_xmss: No such file or directory
    debug2: we did not send a packet, disable method
    debug3: authmethod_lookup password
    debug3: remaining preferred: ,password
    debug3: authmethod_is_enabled password
    debug1: Next authentication method: password
    debug1: read_passphrase: can't open /dev/tty: No such device or address
    debug3: send packet: type 50
    debug2: we sent a password packet, wait for reply
    debug3: receive packet: type 51
    debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
    Permission denied, please try again.
    debug1: read_passphrase: can't open /dev/tty: No such device or address
    debug3: send packet: type 50
    debug2: we sent a password packet, wait for reply
    debug3: receive packet: type 51
    <snip>

    # sum /opt/freeware/bin/sshpass
    59083 65 /opt/freeware/bin/sshpass

    # ls -l /dev/tty
    crw-rw-rw- 1 root system 1, 0 Mar 02 16:46 /dev/tty

    Using the same syntax on RHEL server to AIX works without problem.

    Thanks for help.

    ------------------------------
    Jörg Witzel
    ------------------------------


  • 2.  RE: sshpass Problem

    Posted 30 days ago
    Edited by Ayappan P 30 days ago
    Please make sure whether you have recent openssh & openssl fileset installed.
    You can get the fileset from AIX web download pack programs --> https://www-01.ibm.com/marketing/iwm/iwm/web/pickUrxNew.do?source=aixbp

    ------------------------------
    Ayappan P
    ------------------------------



  • 3.  RE: sshpass Problem

    Posted 21 days ago
    I met the same error, and the lastest openssh 8.1 is installed. But I assume sshpass doesn't pass the password correctly as the log. Would you have any suggestion? Thank you.

    ======================

    Mar 31 06:42:28 nntaix02 auth|security:info sshd[14352414]: Failed password for qzxl from 10.1.25.59 port 11185 ssh2
    Mar 31 06:42:28 nntaix02 auth|security:info syslog: ssh: failed login attempt for qzxl from 10.1.25.59
    Mar 31 06:42:28 nntaix02 auth|security:info sshd[14352414]: Failed password for qzxl from 10.1.25.59 port 11185 ssh2
    Mar 31 06:42:28 nntaix02 auth|security:info syslog: ssh: failed login attempt for qzxl from 10.1.25.59
    Mar 31 06:42:28 nntaix02 auth|security:info sshd[14352414]: Connection closed by authenticating user qzxl 10.1.25.59 port

    ------------------------------
    NNIT UNIXVAGT
    ------------------------------



  • 4.  RE: sshpass Problem

    Posted 21 days ago
    Hi,
    I usually use expect, so tried sshpass and saw the same thing using AIX 7.5.2.1. In particular:
    openssh.base.client/server 8.1.102.2101
    openssl.base 1.0.2.2100
    sshpass-1.06-2.ppc
    .
    Saw the same errors on AIX to AIX, AIX to Linux, but Linux to AIX okay
    Turning on debugging on the endpoint
    .
    For vanila ssh providing password:
    Apr 1 08:03:52 ibmpc3 auth|security:info sshd[20971840]: Accepted password for red from 192.168.138.141 port 37767 ssh2
    Apr 1 08:03:52 ibmpc3 auth|security:info sshd[16253414]: Received disconnect from 192.168.138.141 port 37767:11: disconnected by user
    Apr 1 08:03:52 ibmpc3 auth|security:info sshd[16253414]: Disconnected from user red 192.168.138.141 port 37767
    Using sshpass with password (-p -e or -f flags all the same):
    Apr 1 08:04:02 ibmpc3 auth|security:info sshd[20644186]: Failed password for red from 192.168.138.141 port 37772 ssh2
    Apr 1 08:04:02 ibmpc3 auth|security:info syslog: ssh: failed login attempt for red from 192.168.138.141
    Apr 1 08:04:02 ibmpc3 auth|security:info sshd[20644186]: Failed password for red from 192.168.138.141 port 37772 ssh2
    Apr 1 08:04:02 ibmpc3 auth|security:info syslog: ssh: failed login attempt for red from 192.168.138.141
    Apr 1 08:04:02 ibmpc3 auth|security:info sshd[20644186]: Connection closed by authenticating user red 192.168.138.141 port 37772 [preauth]
    .
    I will try next with wireshark to confirm if sshpass is actually sending something and update soon.
    Cheers,

    ------------------------------
    --------------------
    Antony Steel (Red)
    ===============
    ------------------------------



  • 5.  RE: sshpass Problem

    Posted 14 days ago
    Hi,
    Nothing stood out in wireshark..
    .
    I found running sshd in debug on a different port, vanila ssh showed
    <snip>
    debug1: kbdint_alloc: devices '' [preauth]^M
    debug1: userauth-request for user red service ssh-connection method password [preauth]^M
    debug1: attempt 3 failures 2 [preauth]^M
    debug1: AIX/loginrestrictions returned 0 msg (none)^M
    Accepted password for red from 192.168.138.141 port 32853 ssh2^M
    debug1: AIX/loginsuccess: msg 4 unsuccessful login attempts since last login.
    Last unsuccessful login: Thu Apr 8 04:20:09 CDT 2021 on ssh from 192.168.138.141
    <\snip>
    .
    and with sshpass, similar up until
    <snip>
    debug1: kbdint_alloc: devices '' [preauth]^M
    debug1: userauth-request for user red service ssh-connection method password [preauth]^M
    debug1: attempt 3 failures 2 [preauth]^M
    Failed none for red from 192.168.138.141 port 32860 ssh2^M
    <\snip>
    .
    I downloaded version 1.09 from github and found the same error.
    .
    Sorry, will try a few other debugging options.
    Cheers,

    ------------------------------
    --------------------
    Antony Steel (Red)
    ===============
    ------------------------------