Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh_copy_id does not detect 'Permission denied' errors #213

Open
smolin-de opened this issue Oct 12, 2023 · 0 comments
Open

ssh_copy_id does not detect 'Permission denied' errors #213

smolin-de opened this issue Oct 12, 2023 · 0 comments

Comments

@smolin-de
Copy link
Contributor

The 'ssh_copy_id' task did not copy the ssh key, but returned "ok".
See the lines below:

TASK [ssh_copy_id : Print results of copying ssh id to remote host] ************
ok: [127.0.0.1] => {
    "ssh_copy": {
        "changed": true,
        "cmd": [
            "expect",
            "/home/jenkins/workspace/OCP-BOE/BOE-Installs/dev/ocp-multiarch-install-with-aop-ocp3_dhcp-cluster/aop/roles/ssh_copy_id/files/ssh-copy-id-expect-pass.exp"
        ],
        "delta": "0:00:21.077410",
        "end": "2023-10-12 15:02:23.552777",
        "failed": false,
        "msg": "",
        "rc": 0,
        "start": "2023-10-12 15:02:02.475367",
        "stderr": "",
        "stderr_lines": [],
        "stdout": "spawn ssh-copy-id -f -o StrictHostKeyChecking=no -i /home/jenkins/.ssh/ansible-ocpz.pub ****@172.23.232.220\r\n/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: \"/home/jenkins/.ssh/ansible-ocpz.pub\"\r\nWarning: Permanently added '172.23.232.220' (ECDSA) to the list of known hosts.\r\r\n\r****@172.23.232.220's password: \r\nPermission denied, please try again.\r\r\n\r****@172.23.232.220's password: ",
        "stdout_lines": [
            "spawn ssh-copy-id -f -o StrictHostKeyChecking=no -i /home/jenkins/.ssh/ansible-ocpz.pub ****@172.23.232.220",
            "/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: \"/home/jenkins/.ssh/ansible-ocpz.pub\"",
            "Warning: Permanently added '172.23.232.220' (ECDSA) to the list of known hosts.",
            "",
            "",
            "****@172.23.232.220's password: ",
            "Permission denied, please try again.",
            "",
            "",
            "****@172.23.232.220's password: "
        ]
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant