當我 ssh 進入特定伺服器時,我會得到一個互動式非登入 shell。為什麼我沒有獲得登入 shell?

當我 ssh 進入特定伺服器時,我會得到一個互動式非登入 shell。為什麼我沒有獲得登入 shell?

所以我發現當我透過 ssh 登入時我的 .profile 或 .bash_profile 沒有來源。

我試過shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'

這給了我:Not login shell但是如果我啟動 tmux,它確實會給我一個登入 shell。

為什麼?

編輯:我使用金鑰身份驗證使用命令進行連接ssh user@domain(密碼身份驗證給出相同的結果。)我的 .ssh/config 檔案中沒有相關詳細資訊。 (沒有一個的結果相同。)

相關內容