PDA

View Full Version : ssh variables


eeluve
July 10th, 2012, 12:25
The short story is - I have configured local xmpp server to inform me about ssh connections on the FreeBSD servers with any user. And I have got 2 problems. First, the $SSH_TTY and $SSH_CONNECTION variables work fine on 9.0, but do not on those, not yet upgraded, 8.1's. Some ssh2 problems, are those compiled with the sshd, or possible to set/point them somehow? Second is, I don't get the expected warning message part output(not a huge loss, just why?). Here's the sshrc:

echo "Date: `date` Remote Host: $SSH_CONNECTION User: $USER Shell: $SSH_TTY" |\
sendxmpp -s 'SSH login on the XXX server' -r 'Intruders' xxx@xxx.xxx.xxx.xxx

The missing part is:

-s 'SSH login on the XXX server' -r 'Intruders'

eeluve
July 11th, 2012, 08:59
I possibly have explained something wrong or not enough information, not sure. If someone could give an idea on the variables part of the question at least, that would be great. I have read huge manual on the bash loading sequence, which configs it reads, what is the order and everything that possibly belongs to. And I don't see a solution still.