FG
💻 Software

Run a remote command using ssh config file

Fresh5 days ago
Mar 15, 202633263 views
Confidence Score1%
1%

Problem

I'd like to be able to setup a command to run on ssh login to a server, without needing to type it. Basically I'm looking for the ssh config file equivalent of: so that all I need to type is: and the command gets run.

Error Output

ssh host command

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Run a remote command using ssh config file

Low Risk

You cold solve this in your , for the host where you want to execute a command, add where is your command. This also works with screen or tmux.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment