亚洲高清vr播放在线观看,欧美亚洲精品免费,欧美日韩天堂在线视频,午夜福利小视频

      學(xué)習(xí)啦>學(xué)習(xí)電腦>操作系統(tǒng)>Linux教程>

      liunx ssh免密碼登錄命令行

      時(shí)間: 志藝942 分享

        SSH最初是UNIX系統(tǒng)上的一個(gè)程序,后來(lái)又迅速擴(kuò)展到其他操作平臺(tái)。那么你知道liunx ssh免密碼登錄命令行么?接下來(lái)是小編為大家收集的liunx ssh免密碼登錄命令行,歡迎大家閱讀:

        liunx ssh免密碼登錄命令行

        1、使用 ssh-keygen -t rsa 生成私鑰和公鑰

        ssh-keygen -b 1024 -t dsa

        Generating public/private dsa key pair.

        Enter file in which to save the key (/home/user/.ssh/id_dsa): /home/user/.ssh/id_dsa

        Enter passphrase (empty for no passphrase):

        Enter same passphrase again:

        Your identification has been saved in /home/user/.ssh/id_rsa.

        Your public key has been saved in /home/user/.ssh/id_ras.pub.

        www.2cto.com

        2、密鑰分發(fā)

        把私鑰放在自己的機(jī)器上的~/.ssh/目錄下并保證訪問(wèn)權(quán)限是“-rw-------”(即600)。

        再把生成的公鑰放在要連接的遠(yuǎn)程主機(jī)的~/.ssh/目錄下并改名為authorized_keys,并且保證文件除了屬主外沒(méi)有被人修改的權(quán)限。

        命令

        cd ~/.ssh

        ssh-copy-id user@IP

        or

        ssh-copy-id –i id_rsa.pub user@IP

        3、登錄

        ssh username@ip直接登錄

        4、運(yùn)行命令

        ssh user@ip ./test.sh

        普通用戶ssh連接linux服務(wù)器是總是提示:

        ulimit: open files: cannot modify limit: Operation not permitted

        解決辦法:

        vi /etc/security/limits.conf

        添加: www.2cto.com

        * soft nofile 65535

        * hard nofile 65535

        如果無(wú)法登錄,

        刪除/home/user/.ssh/known_hosts文件再試

        
      看了“liunx ssh免密碼登錄命令行”還想看:

      1.linux命令ssh遠(yuǎn)程登錄命令簡(jiǎn)單實(shí)例

      2.教你Linux的遠(yuǎn)程登錄方法和無(wú)密碼登錄方法

      3.ssh遠(yuǎn)程執(zhí)行命令方法和Shell腳本實(shí)例

      4.linux ssh 別名登錄教程

      2961577