Imagine you have a check of a remote system that correctly executes an apt-get update.

Typically, I have seen as resulting printout there this line:

Reading package lists... Done

By occasion, with Ubuntu 20.04, I've found out though the following:

  • if you execute apt-get update locally, the system says, Reading package lists... Done;
  • if you execute apt-get update remotely, the system says only, Reading package lists... that is the word "Done" is missing.

Previously, I haven't observed this behavior with Ubuntu 18.04 LTS.

What could be the reason?

Below: console excerpt with the described Bash exercise and corresponding output.

localuser@ho:/tmp$ ssh -i /tmp/.ssh-dbg20-puzzled-mendel-1690/one  remoteuser@ lsb_release -a 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:    20.04
Codename:   focal
localuser@ho:/tmp$ ssh -i /tmp/.ssh-dbg20-puzzled-mendel-1690/one  remoteuser@ "sudo apt-get update"
Hit:1 http://ftp.stw-bonn.de/ubuntu focal InRelease
Hit:2 http://ftp.stw-bonn.de/ubuntu focal-updates InRelease
Hit:3 http://ftp.stw-bonn.de/ubuntu focal-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Reading package lists...
localuser@ho:/tmp$ ssh -i /tmp/.ssh-dbg20-puzzled-mendel-1690/one  remoteuser@
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-40-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

Last login: Tue Jul  7 23:38:45 2020 from
remoteuser@dbg20-puzzled-mendel-1690:~$ sudo apt-get update
Hit:1 http://ftp.stw-bonn.de/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://ftp.stw-bonn.de/ubuntu focal-updates InRelease
Hit:4 http://ftp.stw-bonn.de/ubuntu focal-backports InRelease
Reading package lists... Done
  • 2
    Try ssh -t ... remoteuser@ sudo apt-get update, allocating a TTY
    – muru
    Jul 7 '20 at 22:13
  • @muru haha thank you this works!
    – J. Doe
    Jul 7 '20 at 22:30
  • 1
    expect is a tool that lets you automate conversations with asynchronous entities. That's what I imagine for checking remote systems. Or, invoke a tool/script on the server that makes all the checks you want, and returns a "Healthy: Y/N".
    – waltinator
    Jul 8 '20 at 2:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.