jeudi 2 octobre 2014

how to add commands in .ssh/authorized_keys


Vote count:

0




I read on man sshd one can add post-login processing when a user logs in using a particular key:



environment="FOO=BAR" ssh-rsa AAA... keytag


But when I try to ssh into the system, the target host does not register the line and instead asks for a password. What is the right way of adding this? I would like to do something like



command="echo|mail -s ${USER},${HOSTNAME} a.monitored.email@example.com" ssh-rsa AAA... keytag


I am using Suse SLE 11 SP2.


Thanks Dinesh



asked 51 secs ago

Dinesh

193






how to add commands in .ssh/authorized_keys

Aucun commentaire:

Enregistrer un commentaire