5
votes
1answer
72 views

Linux: $SSH_CONNECTION is set even without SSHing to the server

I have a remote server and I am writing a script in the server and want it to fire only when I SSH. I thought of using the $SSH_CONNECTION and $SSH_TTY for this purpose. I found out that when I have ...
5
votes
1answer
307 views

Logging ssh remote commands to `bash_history`

SSH allows a remote user to issue some command without interactively logging in to the server, as the last line of ssh usage indicates: usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c ...
2
votes
1answer
252 views

Why doesn't my new cygwin .bashrc interactive check work?

I just updated Cygwin and the new .bashrc contains this line right at the top: echo "BEFORE TEST" # If not running interactively, don't do anything [[ "$-" != *i* ]] && return echo "AFTER ...