Hot answers tagged

4

pass uses gpg to encrypt your passwords. This means you can use gpg-agent to cache your passphrase, thereby allowing the gpg tools and therefore pass to decrypt its files without asking for your passphrase again. If you're using GnuPG >= 2.1.0, gpg-agent will be started automatically. If not, there are (unfortunately) numerous ways to have gpg-agent start ...


2

The way I handle the same requirement is similar as what Mike wrote about Michael: ~/bin/sshmyvps #!/bin/bash if ! ssh-add -l|grep -q vpsaccess then ssh-add -t 2h ~/ssh-keys/vpsaccess.key fi ssh myuser@myserver.mydomain.net The main difference being that I don't look for just any loaded keys but only for a specific one and then leaving it valid for ...


1

Condition: installer - ls . | grep example.runchmod +x pelda.run else wget download/link/of/example.run As I understand the above, it translates to: if [ -f example.run ] then chmod +x pelda.run else wget download/link/of/example.run fi [ -f example.run ] is an example of using the test command. If a file named example.run exists, then the ...


1

In the script I had to pass it the -t flag to force tty allocation: spawn ssh -t <server> su - It now works as expected.


1

Let me explain this to you The differnce is that linux has two ways to lock an user's login : 1- by locking the password 2- by locking the username First: passwd -l test < this will lock the password for user. passwd -u test < the locked password can only be unlocked by this, means only then user can login. Second: ...



Only top voted, non community-wiki answers of a minimum length are eligible