The remote server command is running

What would be the best way to execute shell commands on remote servers and get output without actually logging in.

Maybe using the shh keys. Preferably with python.

+4
python
source share
4 answers

Do you mean without logging in manually? Since a server that actually allows you to execute commands without logging in will pose a serious security risk.

It seems that in the area of ​​Python interfaces for SSH, Paramiko is what everyone uses these days. Here is a good introductory article I found through Google: http://jessenoller.com/2009/02/05/ssh-programming-with-paramiko-completely-different/

To avoid entering a password each time you log in, you really want to configure an SSH key pair on your computer and send the public key to the server. The method of this depends on which SSH client you are using and which server-side SSH server software.

+7
source share

I assume that you want to optimize the use of SSH for application deployment or system administration tasks.

In this case, I suggest Fabric .

+2
source share

Paramico is the most convenient way to use SSH with Python that I have found so far.

Good luck

0
source share

Paramiko is really good and convenient for transferring files and executing commands on a remote server.

But the problem is that we cannot catch the output of the command. It is difficult to understand whether the command is executed correctly or not.

0
source share

All Articles