Skip to content

Commit 7451611

Browse files
committed
Use login shell
1 parent e54ed8e commit 7451611

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mpssh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async def ssh_connect_and_run_command(
8383
) -> SSHResult:
8484
try:
8585
escaped_command = escape_shell_command(command)
86-
ssh_command = f"ssh -o ConnectTimeout={timeout} {host} '{escaped_command}'"
86+
ssh_command = f"ssh -o ConnectTimeout={timeout} {host} 'exec \"$SHELL\" -l -c \"{escaped_command}\"'"
8787

8888
process = await asyncio.create_subprocess_shell(
8989
ssh_command,

0 commit comments

Comments
 (0)