Is there any way to set a password on a script (or any file for that matters), without having to enter a specific command line to decrypt it each time I want to edit it? Setting this password to a directory, making every file (present and future) password-protected would be fine, and actually even better.
Situation example :
nano path/to/script Enter passphrase : ***** [Modification allowed, then file closed] path/to/script/scriptToExecute [Is executed without asking for password]
sudo is in itself a solution, but the problem is that unless I leave terminal, it doesn't ask for password when it's been entered once in a single session.
The purpose of this would be to connect to a distant SSH without having to type the password every time (mostly to do scp commands actually), hence putting it in the script. But if everyone can access it, it becomes pretty much meaningless. Any idea/solution?
Thanks for your answers.