runs the specified operating system command on the remote host, returning the exit code obtained.
runs the command on the machine with the specified IP address.
Details and Options
- RemoteRun["host","command"] by default prompts for a username and password.
- RemoteRun["user@host",…] prompts for a password only.
- RemoteRun will use an ssh-agent for authentication if available.
- RemoteRun allows the following options:
Authentication $SSHAuthentication authentication parameters for the connection RemoteAuthorizationCaching False whether to use remote authorization caching
- In the form Authentication->assoc, the association assoc can contain these keys:
"Username" username to use for authentication "Password" password to use for authentication "SSHKey" SSH identity "SSHKeyPassword" passphrase string to use to decrypt SSHKey
- An SSH identity can be given in the form "SSHKey"->File[ident], where ident is a file containing an SSH private key. It can also be given as "SSHKey"->"string", where "string" is an SSH private key.
- RemoteRun returns the error code of the remote "command".
Examplesopen allclose all
Basic Examples (3)
Check the contents of that file using RemoteRunProcess:
Create a persistent session with RemoteConnect: