Run htop over ssh via single command

8,800

Use the -t flag with SSH:

ssh [email protected] -t 'htop'

This will force a TTY allocation (ssh doesn't allocate a TTY if it's not necessary, normally only for interactive shells).

Share:
8,800

Related videos on Youtube

wb7
Author by

wb7

Updated on September 18, 2022

Comments

  • wb7
    wb7 almost 2 years

    I want to run htop over ssh - but launch it automatically on a keyboard-less system with a shell script. My first idea was

    ssh [email protected] 'htop'
    

    but:

    Error opening terminal: unknown.
    

    Is there any way to start htop remote without typing the command every connection?

    Thanks in advance!