Digital-Sapphire/PyUpdater

paramiko.ssh_exception.BadAuthenticationType: Bad authentication type; allowed types: ['publickey']

Elabbasy00 opened this issue · 1 comments

can't upload deploy files to server using scp plugin

--settings command
`

[INFO] PyUpdater 4.0
579 INFO: PyUpdater 4.0
595 DEBUG: Config Dir: C:\Users\akram\Desktop\Bot_Tool\.pyupdater
595 DEBUG: Config DB: C:\Users\akram\Desktop\Bot_Tool\.pyupdater\config.pyu
Enter username. Can be left blank to use environmental variable.
[DEFAULT] -> root
Press Enter To Use Default
-->
You entered root, is this correct?
[N/y]?y
Enter password, if needed
[DEFAULT] ->
Press Enter To Use Default
-->  C:\Users\akram\.ssh\bot.pub
You entered  C:\Users\akram\.ssh\bot.pub, is this correct?
[N/y]?y
Enter path to keyfile, if needed
[DEFAULT] ->  C:\Users\akram\.ssh\bot
Press Enter To Use Default
-->  C:\Users\akram\.ssh\bot.pub
You entered  C:\Users\akram\.ssh\bot.pub, is this correct?
[N/y]?y
Enter host
[DEFAULT] -> xxx.xxx.xxx.xxx
Press Enter To Use Default
-->
You entered xxx.xxx.xxx.xxx, is this correct?
[N/y]?y
Port number
[DEFAULT] -> 22
Press Enter To Use Default
-->
You entered 22, is this correct?
[N/y]?y
Enter remote directory
[DEFAULT] -> /home/
Press Enter To Use Default
-->
You entered /home/, is this correct?
[N/y]?y

`

--upload command

`
[INFO] PyUpdater 4.0
562 INFO: PyUpdater 4.0
577 DEBUG: Config Dir: C:\Users\akram\Desktop\Bot_Tool\.pyupdater
578 DEBUG: Config DB: C:\Users\akram\Desktop\Bot_Tool\.pyupdater\config.pyu
592 DEBUG: Config Dir: C:\Users\akram\Desktop\Bot_Tool\.pyupdater
593 DEBUG: Config DB: C:\Users\akram\Desktop\Bot_Tool\.pyupdater\config.pyu
595 DEBUG: Config Dir: C:\Users\akram\Desktop\Bot_Tool\.pyupdater
599 DEBUG: Config DB: C:\Users\akram\Desktop\Bot_Tool\.pyupdater\config.pyu
600 DEBUG: Config Dir: C:\Users\akram\Desktop\Bot_Tool\.pyupdater
601 DEBUG: Config DB: C:\Users\akram\Desktop\Bot_Tool\.pyupdater\config.pyu
908 INFO:  C:\Users\akram\.ssh\bot.pub
1226 INFO: Connected (version 2.0, client OpenSSH_8.2p1)
2049 INFO: Authentication (publickey) failed.
2440 INFO: Authentication (publickey) failed.
Bad authentication type; allowed types: ['publickey']
[ERROR] Bad authentication type; allowed types: ['publickey']
2753 ERROR: Bad authentication type; allowed types: ['publickey']
2763 DEBUG: Bad authentication type; allowed types: ['publickey']
Traceback (most recent call last):
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\pyupdater\cli\__init__.py", line 79, in main
    _real_main(args)
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\pyupdater\cli\__init__.py", line 55, in _real_main
    dispatch_command(args, pyi_args)
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\pyupdater\cli\__init__.py", line 68, in dispatch_command
    cmd(args, pyi_args)
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\pyupdater\cli\commands.py", line 411, in _cmd_upload
    pyu.set_uploader(upload_service, ns.keep)
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\pyupdater\core\__init__.py", line 90, in set_uploader
    self.up.set_uploader(requested_uploader, keep)
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\pyupdater\core\uploader.py", line 100, in set_uploader
    self.uploader = self.plg_mgr.get_plugin(requested_uploader, init=True)
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\pyupdater\utils\__init__.py", line 177, in get_plugin
    plugin.init_config(config)
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\scp_uploader.py", line 90, in init_config
    self.connect()
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\scp_uploader.py", line 139, in connect
    self.ssh.connect(self.host, **data)
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\paramiko\client.py", line 435, in connect
    self._auth(
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\paramiko\client.py", line 766, in _auth
    raise saved_exception
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\paramiko\client.py", line 753, in _auth
    self._transport.auth_password(username, password)
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\paramiko\transport.py", line 1509, in auth_password
    return self.auth_handler.wait_for_response(my_event)
  File "C:\Users\akram\AppData\Local\Programs\Python\Python310\lib\site-packages\paramiko\auth_handler.py", line 250, in wait_for_response
    raise e
paramiko.ssh_exception.BadAuthenticationType: Bad authentication type; allowed types: ['publickey']
`

@Elabbasy00 it seems, from the stack trace, that your server is not sending the publickey, or that it's not set up to expect a ssh authentication.