i want to run some command on several machine using ssh. I know it can be done by just using the command "ssh user@hostname command". However, the command i want to run print some string on the console. Is there any way that send all the strings back to the console that i'm on?
Running command on remote machine using ssh
commandgnu-screenssh
Related Question
- How to use SSH to run a local shell script on a remote machine
- Bash – Find and Replace Inside a Text File from a Bash Command
- Bash – How to specify the private SSH-key to use when executing shell command on Git
- Ssh “permissions are too open” error
- Git error: “Host Key Verification Failed” when connecting to remote repository
- Ssh remote host identification has changed
- Git – SSH Key – Still asking for password and passphrase
Best Solution
You could run the commands in a screen:
You can then detach (Ctrl-D) from the screen, let it run for however long it will run, then re-attach (screen -r test) to the screen and see all of the output. This assumes that you won't have a ton of output from the commands, however. Here's a link to a tutorial on screen.