0

I am using paramiko library to install curl on remote machine but not able to do so.

    ssh = paramiko.SSHClient()
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    ssh.connect(hostname='vmware_ip', username='ubuntu 20.08', password='#######')

    # stdin, stdout, stderr = ssh.exec_command('ls')
    stdin, stdout, stderr = ssh.exec_command('sudo apt-get install curl')

    # for line in stdout.read().splitlines():
    #     print(line)

    print(stdout.readlines())
    ssh.close()

install_curl()

enter image description here

Its returning an empty array on this command. can anyone help me installing curl to a remote linux machine??

0 Answers0