1

Lets say I have 3 machines (reachable over ssh with the same pass and username) and I want to see periodically updated output of a simple script ('nvidia-smi') in 1 window (concatenated) from all 3 machines. How would the command look?

Edit: I do not know how to concatenate output from 3 periodically running commands over ssh.

Edit 2: it is not a question about security, it is not exposed to the internet.

Holi
  • 384
  • 2
  • 15

1 Answers1

0

Lets say I have 3 machines (reachable over ssh with the same pass and username)

Let's not and say we did. Unless you're running this as a toy system completely isolated from the internet, this is not how you should be accessing a server regularly. You want to read up on setting up a server's SSH securely. Simply having a strong password is not enough. If this is not a server you own (and you aren't managing its SSH), you still do not want to use a username/password combo to log in. Use an SSH key.

and I want to see periodically updated output of a simple script ('nvidia-smi') in 1 window (concatenated) from all 3 machines.

Well, once you have your SSH set up securely, you would use the ssh program on your machine. 'ssh username@host.domain "command to execute"' will output that command's stdout to your stdout. From there, it's the same thing as "How do I take the output from three commands and print them all to my screen?"

AmphotericLewisAcid
  • 1,824
  • 9
  • 26