Ошибки Paramiko

Содержание
AttributeError: 'NoneType' object has no attribute 'time'
sudo: no tty present and no askpass program specified
Похожие статьи

AttributeError: 'NoneType' object has no attribute 'time'

AttributeError: 'NoneType' object has no attribute 'time'

Решается добавлением кода

import time

В начало скрипта и

time.sleep(1)

Сразу после вызова команды

sudo: no tty present and no askpass program specified

sudo: no tty present and no askpass program specified

Чтобы избавиться от этой ошибки можно отредактировать файл /etc/sudoers по этой инструкции

Если это не помогло - проверьте отключена ли опция requiretty

Если вы не хотите разрешать пользователю применять sudo без пароля - пароль можно вводить интерактивно

(stdin, stdout, stderr) = client.exec_command(command=command,get_pty=True) stdin.write("ваш_пароль")

Article author: Andrei Olegovich

Похожие статьи
Paramiko Ошибки
Python
if, elif, else
Циклы
Методы
enum
Banner image

Search this site

Subscribe to Telegram channel @aofeed to follow new articles and updates to old ones

Go to channel

@aofeed

Ask a question in the Telegram group

@aofeedchat

Contacts and cooperation:
I recommend our hosting beget.ru
Write to info@urn.su if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: