2015-07-02 14 views
0

每一次 - 我ssh到我的服務器我不斷收到如何在ssh進入服務器時禁用問候消息?

SSH [email protected]

Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-52-generic x86_64) 

* Documentation: https://help.ubuntu.com/ 

    System information as of Thu Jul 2 10:58:35 EDT 2015 

    System load: 0.16    Processes:   90 
    Usage of /: 13.5% of 19.56GB Users logged in:  0 
    Memory usage: 25%    IP address for eth0: 12.34.56.78 
    Swap usage: 0%     IP address for eth1: 10.10.10.10 

    Graph this data and manage this system at: 
    https://landscape.canonical.com/ 

Last login: Thu Jul 2 10:58:35 2015 from 50-198-81-174-static.hfc.comcastbusiness.net 

這沒關係,在我第一次顯示登錄到服務器。 但是總是看到這個信息 - 我覺得有點不必要。

有人可以告訴我如何禁用它嗎?

回答

2

大多數理智的解決方案,如果它是你自己的服務器,將會禁用SSH守護進程配置中的motd。將PrintMotd設置爲/etc/ssh/sshd_configno,然後重新啓動ssh守護進程。

或者,您可以嘗試touch ~/.hushlogin,它會在您的主文件夾中創建一個空文件。允許遠程登錄的守護程序通常會檢查是否存在此文件,如果存在,它們將允許您安靜地登錄。

+0

嗯...我想我會那麼做。謝謝 !這兩個你建議一個在另一箇中的哪一個?爲什麼? – ihue

+1

另外,我剛查過,我的'PrintMotd'已經設置爲'no'。現在嘗試你最後的建議。 – ihue

+0

'touch〜/ .hushlogin'完美運作。 – ihue