2017-04-13 227 views
-2

我在過去使用mac上的終端訪問SSH到我的網站。但是,每次嘗試打開終端時,我都會自動登錄。而且我無法註銷/退出以使用終端。它總是「在殼內」。從終端MAC終止SSH

當我嘗試「退出」或「註銷」或「ctrl + d」時,它會註銷並出現「[已完成處理]」。但是,我無法使用終端,按任何鍵時都不會發生任何事情。

所以我退出終端並重新啓動它,然後我回到原點,登錄到SSH。我想使用終端應用程序。

回答

0

通過您登錄到服務器時,可以通過執行獲得tty PID。

PS EF

就用殺,等等;

殺-9 PID

這會殺了你和服務器的連接。

0

我從來沒有測試過,但通過快速搜索,我發現了兩篇文章,first articlesecond article

第一篇文章提到關於別名(這是ssh登錄而不使用密碼到遠​​程服務器)。您可以嘗試檢查您的.bashrc文件中是否創建了別名,如果它有,則將其刪除。

第二篇文章提到改變你的終端行爲,這很可能是你的情況。文章提到你可以檢查你的默認shell路徑。

步驟來檢查你的shell路徑:

- Go to terminal and open preferences 
- Under General tab, you will see 'Shells open with' 
- If it is under default then you might want to check '/usr/bin/login' and '/bin/bash', if there is anything that run the above alias and remove it if there is. 
- If it is under Command(complete path), then you might want to check the path, if there is anything that run the above alias and remove it if there is. 

我再說一遍,我沒有測試過這個,因爲我沒有這個問題,但我希望這將幫助您解決您的問題。祝你今天愉快。

+0

是啊讀過它們,但那些沒有幫助。我也嘗試過「shell打開」,但我仍然登錄到shell。我不知道這個東西。我遵循指導如何連接到我的網站從它下載文件。現在我卡在那裏:S –