Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

openSUSE 12.1 手動編譯安裝 OpenSSH 6.2p1 教學

編輯:關於 Linux

針對 openSUSE 12.1 x86 KVM 虛擬機環境,示範從原始碼手動編譯安裝 OpenSSH 6.2p1,並修改預設埠為 8022 的完整流程。

安裝步驟

  1. 安裝相依套件:zlib、openssl。
  2. 下載並解壓 openssh-6.2p1。
  3. 編譯安裝:
    ./configure --prefix=/usr --with-pam
    make
    make install
  4. 產生金鑰:
    ssh-keygen -t dsa -f /usr/etc/ssh_host_dsa_key
    ssh-keygen -t rsa -f /usr/etc/ssh_host_rsa_key
  5. 複製並修改設定檔:
    cp -r /etc/ssh /etc/myssh/
    編輯 /etc/myssh/sshd_config,將 Port 22 改為 Port 8022。
  6. 若報錯缺少 /var/empty,建立並設定權限:
    mkdir /var/empty && chown root:wheel /var/empty && chmod 555 /var/empty
  7. 啟動服務:
    /usr/sbin/sshd -f /etc/myssh/sshd_config
  8. 驗證:netstat -apn | grep sshd 確認 8022 埠監聽,客戶端以 ssh -p 8022 user@host 連線測試。

手動編譯可掌控版本與編譯參數,適合特定相容性需求環境。

Copyright © Windows教程網 All Rights Reserved