0

Unfortunately I can not connect to a host using apt-dater.

The error is:

Pseudo-terminal will not be allocated because stdin is not a terminal.
ADPROTO: 0.7
LSBREL: CentOS|7.2.1511|Core
VIRT: Unknown
UNAME: Linux|x86_64
FORBID: 0
sudo: sorry, you must have a tty to run sudo

ADPERR: Error executing 'sudo yum list updates' (256).

If I connect to server using the key c I can connect without problems:

Script started, file is /root/.local/share/apt-dater/history/example.com:22/1460468336-14958/typescript
Last login: Tue Apr 12 15:37:08 2016 from apt-dater.example.com


CentOS 7.2.1511 x86_64

FQDN:      example.com (xxx.xxx.xxx.xxx)
Processor: 8x Intel(R) Core(TM) i7 CPU         960  @ 3.20GHz
Kernel:    4.2.8-1-pve
Memory:    4.00 GB

[apt-dater@1 ~]$ sudo yum list updates
Geladene Plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.23media.de
 * epel: mirror.imt-systems.com
 * extras: mirror.imt-systems.com

What can I do here?

MyFault
  • 913
  • 3
  • 15
  • 36

1 Answers1

1

sudo is configured to require a TTY per default. You can override this behavior with the following line in /etc/sudoers or in an include file in /etc/sudoers.d:

...
Defaults       !requiretty
...
chicks
  • 3,793
  • 10
  • 27
  • 36
aeronet
  • 11
  • 1