Timeline for How to automatically run commands on SSH login?
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 18, 2021 at 14:41 | comment | added | Dmitry Grigoryev |
.bashrc is a rather poor place for such commands: they will be run again and again in every new instance of bash that you run.
|
|
S Nov 11, 2021 at 4:53 | history | edited | ZygD | CC BY-SA 4.0 |
Removed single quote "'" so somebody who copies/pastes it will not have to deal with fixing the syntax.
|
S Nov 11, 2021 at 4:53 | history | suggested | Liver | CC BY-SA 4.0 |
Removed single quote "'" so somebody who copies/pastes it will not have to deal with fixing the syntax.
|
Nov 11, 2021 at 4:51 | review | Suggested edits | |||
S Nov 11, 2021 at 4:53 | |||||
Jan 29, 2017 at 12:37 | comment | added | Llamageddon |
@zondo @e-info128 exec command will replace the current shell with whatever you run.
|
|
Jan 28, 2017 at 10:49 | comment | added | Fabio | This however does not work for ssh session which do not use bash, e.g. when I open an sftp session. | |
Jan 4, 2017 at 13:53 | comment | added | zondo |
@Llamageddon: I think he's wondering the same thing I am. If I wanted to put my entire SSH session into screen , I might use your answer and put screen there instead of the echo. The problem with that is that finishing the screen session will return to the SSH prompt instead of logging out. Just writing out this comment gave me the answer, though: add the logout command after the screen command.
|
|
Oct 28, 2014 at 16:16 | comment | added | Llamageddon | @WHK What do you mean by losing the session? | |
Oct 27, 2014 at 18:47 | comment | added | e-info128 | and how do I lose the session after closing execution? | |
Nov 8, 2011 at 20:42 | history | edited | Simon Sheehan | CC BY-SA 3.0 |
deleted 88 characters in body
|
Nov 8, 2011 at 10:22 | history | answered | Llamageddon | CC BY-SA 3.0 |