About 1,970,000 results
Open links in new tab
  1. Perform commands over ssh with Python - Stack Overflow

    Aug 27, 2010 · I'm writing a script to automate some command line commands in Python. At the moment, I'm doing calls like this: cmd = "some unix command" retcode = …

  2. How to use SSH to run a local shell script on a remote machine?

    This bash script does ssh into a target remote machine, and run some command in the remote machine, do not forget to install expect before running it (on mac brew install expect )

  3. write a shell script to ssh to a remote machine and execute commands

    Dec 18, 2012 · There is are multiple ways to execute the commands or script in the multiple remote Linux machines. One simple & easiest way is via pssh (parallel ssh program) pssh: is a program for …

  4. bash - How can I automate running commands remotely over SSH to ...

    I've searched around a bit for similar questions, but other than running one command or perhaps a few command with items such as: ssh user@host -t sudo su - However, what if I essentially need to ...

  5. linux - How to restrict SSH users to a predefined set of commands after ...

    37 ssh follows the rsh tradition by using the user's shell program from the password file to execute commands. This means that we can solve this without involving ssh configuration in any way. If you …

  6. How to specify password in ssh command - Super User

    Nov 26, 2020 · From the terminal I type: ssh user@ip and then it prompts for a password. Is there a way to specify the password in the ssh command itself?

  7. How to script remote SSH commands in Batch (Windows)

    I am looking to script something in batch which will need to run remote SSH commands on Linux. I would want the output returned so I can either display it on the screen or log it. I tried putty.exe -ssh …

  8. What is the proper way to sudo over SSH? - Stack Overflow

    Sep 12, 2023 · The best way is ssh -t user@server "sudo <scriptname>", for example ssh -t user@server "sudo reboot". It will prompt for password for user first and then root (since we are …

  9. How to automatically run commands on SSH login? - Super User

    Jun 5, 2023 · $ ssh -t server 'cmd; exec bash -l' The last command in the list should start an interactive session in your preferred shell. If you have a lot of commands to run, consider creating a script file on …

  10. What is the cleanest way to ssh and run multiple commands in Bash?

    @Nikolai if the commands depends on the client side, they can be written into a shell script, then scp, ssh, and run. This will the cleanest way, I think.