-1

I have to transfer an audio file recorded with the robot NAO into my pc for further operation regarding the speech emotion recognition. someone know how I can do it through a script python and not through Coreograph. Thanks. This is the code i wrote:

ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

ssh.connect(hostname = "192.168.1.131", username = 'username-here', password = 'password-here')

log.info("Provo a ad aprire la connessine sftp")
sftp = ssh.open_sftp()

localpath = 'C:/Users/alexx/Desktop/prova/provaAudioNao.wav'
remotepath = '"/home/nao/test.wav"'

sftp.get(remotepath, localpath)

sftp.close()
ssh.close()

but this exception is thrown:

paramiko.ssh_exception.BadAuthenticationType: Bad authentication type; allowed types: [u'publickey', u'keyboard-interactive']

Someone know how to solve it?

alexxio92
  • 1
  • 1
  • Please provide enough code so others can better understand or reproduce the problem. – Community May 31 '22 at 19:19
  • I don’t know the code, I’m asking if someone know a script in python to do it. The file is in the folder nao/home on the internal memory of the robot and I need to transfer it on my Pc. – alexxio92 May 31 '22 at 19:27
  • Does this answer your question? [Password authentication in Python Paramiko fails, but same credentials work in SSH/SFTP client](https://stackoverflow.com/questions/55498370/password-authentication-in-python-paramiko-fails-but-same-credentials-work-in-s) – gre_gor Jun 01 '22 at 08:20
  • 1
    You might want to [edit] your post to redact those SSH credentials if those are functional ones – Adriaan Jun 01 '22 at 08:23
  • Possible duplicate of https://stackoverflow.com/questions/43526330/shell-script-to-automate-ssh-login-using-password – tripleee Jun 01 '22 at 09:24

0 Answers0