FG
💻 Software

Run Remote ssh command with Full Login Shell

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

Problem

I would like to do something like However per ssh manpage: If command is specified, it is executed on the remote host instead of a login shell. So what happens is that displays its output and then ssh exits. What I can't figure out is how to have the full login shell open and then have the command run inside that shell. Leaving the shell open after the command is run. As if I had manually done the following: Any ideas?

Error Output

localhost$ ssh example.com 
example.com$ ls
             /folder1 
             /folder2 
example.com$ _

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Run Remote ssh command with Full Login Shell

Low Risk

Just tell bash to execute and then itself in a login shell

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment