Paramiko authentication error from SCP config management issues

Hi all

I am using VyOS version 1.4-rolling-202204140217.
I have system config management setup to scp to a target server.
I had to replace the server with a new one and as such, ssh keys changed.
I have deleted the existing configuration on VyOS and have added the requisite keys to the VyOS vyos account, and also vyos user’s keys to the reinstalled server.

The vyos user account can ssh to the server with key authentication without problems.

Unfortunately each time I commit, I see this error:

Archiving config...
  scp://hostname:/home/user/path/to/dir Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/vyos/remote.py", line 293, in upload
    urlc(urlstring, *args, **kwargs).upload(local_path)
  File "/usr/lib/python3/dist-packages/vyos/remote.py", line 186, in upload
    with self._establish() as ssh, ssh.open_sftp() as sftp:
  File "/usr/lib/python3/dist-packages/vyos/remote.py", line 174, in _establish
    ssh.connect(self.hostname, self.port, self.username, self.password, sock=sock)
  File "/usr/lib/python3/dist-packages/paramiko/client.py", line 435, in connect
    self._auth(
  File "/usr/lib/python3/dist-packages/paramiko/client.py", line 764, in _auth
    raise saved_exception
  File "/usr/lib/python3/dist-packages/paramiko/client.py", line 751, in _auth
    self._transport.auth_password(username, password)
  File "/usr/lib/python3/dist-packages/paramiko/transport.py", line 1509, in auth_password
    return self.auth_handler.wait_for_response(my_event)
  File "/usr/lib/python3/dist-packages/paramiko/auth_handler.py", line 250, in wait_for_response
    raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed.

Please how can I fix this?

Try please the latest rolling release

1 Like

I actually added the password to the scp url configuration. This was still necessary even though the VyOS account could ssh with keys to the target.
I will upgrade to the latest and test.
Thanks

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.