log in via ssh, execute a command after success, and stay connected
by lleb from LinuxQuestions.org on (#5SVXE)
Title sums things up rather well.
I want to ssh into my TrueNAS server (yes that is BSD sorry, but close enough), after I am successfully logged in I want to execute Code:source ./AL.sh and remain logged into the server in a usable mode.
I have seen the syntax Code:ssh -t user@IP command and Code: ssh -t user@IP 'command' as well as combining commands with both the pipe and ;.
All of those options log in, execute the command, than log back out. I have see adding bash -l at the end of a chain of commands, but that locks the terminal without a courser so it is not active and usable.
thanks in advance
I want to ssh into my TrueNAS server (yes that is BSD sorry, but close enough), after I am successfully logged in I want to execute Code:source ./AL.sh and remain logged into the server in a usable mode.
I have seen the syntax Code:ssh -t user@IP command and Code: ssh -t user@IP 'command' as well as combining commands with both the pipe and ;.
All of those options log in, execute the command, than log back out. I have see adding bash -l at the end of a chain of commands, but that locks the terminal without a courser so it is not active and usable.
thanks in advance