Start the SSH connection in PuTTY, run the command and leave the session active

I want to run several shell commands every time I SSH to the server through PuTTY. I am connecting to a web server controlled by someone else and I do not want to store my own scripts there.

I see the Connection> SSH> Remote command option , but if I put my initialization commands here, after the session starts, it closes right after the commands are executed. How can I run a remote command and then keep the session open to continue using it?

+4
source share
2 answers

SSH ( PuTTY ), . "" - . , , :

my-command ; /bin/bash

. .

+5

- putty :

ls > dir.ls & /bin/bash

, , " ls > dir.ls", dir.ls .

, "/bin/bash" .

+2

All Articles