From cf24e4352810bd39896e6d4038dd8193539f9862 Mon Sep 17 00:00:00 2001 From: chn Date: Sat, 4 May 2024 17:13:58 +0800 Subject: [PATCH] update .bashrc to detect non-interactive login without ssh --- jykang/.bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jykang/.bashrc b/jykang/.bashrc index c93aed9..a42daaf 100644 --- a/jykang/.bashrc +++ b/jykang/.bashrc @@ -40,6 +40,11 @@ if [ -z "${BASHRC_SOURCED-}" ]; then exit 1 fi fi + + # check if there exists non-interative login without ssh + if [ -z "${SSH_CONNECTION-}" ]; then + echo "Non-interactive login detected" >> $HOME/linwei/chn/log + fi fi [ -n "$CHN_LS_USE_COLOR" ] && alias ls="ls --color=auto"