Skip to content

Commit

Permalink
feat: disable public keys usage to SSH and SFTP connection
Browse files Browse the repository at this point in the history
  • Loading branch information
icjmaa committed Jul 16, 2023
1 parent b5e011d commit cd2fc0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ConnectionSSH.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def ssh_exec(args, capture_output=False):
os.close(w2_fd)

if program == 'sftp':
os.execvp(program, [program, port, user_host])
os.execvp(program, [program, "-o", 'PubkeyAuthentication=no', port, user_host])
elif program == 'ssh':
os.execvp(program, [program, user_host, command_remote])
os.execvp(program, [program, "-o", 'PubkeyAuthentication=no', user_host, command_remote])

os.close(w1_fd)
os.close(w2_fd)
Expand Down

0 comments on commit cd2fc0b

Please sign in to comment.