国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Debian > 正文

Debian下配置SSH服務器的方法

2024-06-28 13:28:20
字體:
來源:轉載
供稿:網友
Debian下配置SSH服務器的方法

Debian 503版本中實現的,Debian默認好像是沒有ssh支持的。

SSH的安裝apt-get install openssh-serverapt-get install sshSSH的配置OpenSSH的配置都集中在/etc/ssh/ssh_config文件中編輯“ssh_config”文件(vim /etc/ssh/ssh_config),添加或改變下面的參數:

# Site-wide defaults for various optionsHost *ForwardAgent noForwardX11 noRhostsAuthentication noRhostsRSAAuthentication noRSAAuthentication yesPassWordAuthentication yesFallBackToRsh noUseRsh noBatchMode noCheckHostip yesStrictHostKeyChecking noIdentityFile ~/.ssh/identityPort 22Cipher blowfishEscapeChar ~

下面逐行說明上面的選項設置: www.111cn.net

Host *選項“Host”只對能夠匹配后面字串的計算機有效。“*”表示所有的計算機。

ForwardAgent no“ForwardAgent”設置連接是否經過驗證代理(如果存在)轉發給遠程計算機。

ForwardX11 no“ForwardX11”設置X11連接是否被自動重定向到安全的通道和顯示集(DISPLAY set)。

RhostsAuthentication no“RhostsAuthentication”設置是否使用基于rhosts的安全驗證。

RhostsRSAAuthentication no“RhostsRSAAuthentication”設置是否使用用RSA算法的基于rhosts的安全驗證。

RSAAuthentication yes“RSAAuthentication”設置是否使用RSA算法進行安全驗證。

PasswordAuthentication yes“PasswordAuthentication”設置是否使用口令驗證。

FallBackToRsh no“FallBackToRsh”設置如果用ssh連接出現錯誤是否自動使用rsh。

UseRsh no“UseRsh”設置是否在這臺計算機上使用“rlogin/rsh”。

BatchMode no“BatchMode”如果設為“yes”,passphrase/password(交互式輸入口令)的提示將被禁止。當不能交互式輸入口令的時候,這個選項對腳本文件和批處理任務十分有用。

CheckHostIP yes“CheckHostIP”設置ssh是否查看連接到服務器的主機的IP地址以防止DNS欺騙。建議設置為“yes”。

StrictHostKeyChecking no“StrictHostKeyChecking”如果設置成“yes”,ssh就不會自動把計算機的密匙加入“$HOME/.ssh/known_hosts”文件,并且一旦計算機的密匙發生了變化,就拒絕連接。SSH#服務器端配置 /etc/ssh/sshd_config#只考慮協議版本2#全局配置VersionAddendum TecZm-20050505 #在telnet ip 22時只能看出openssh的版本,看不出OSPRotocol 2 #使用協議版本2Port 22 #sshd監聽22端口ListenAddress 192.168.7.1 #sshd只監聽目標ip為192.168.7.1的請求AllowGroups wheel myguest #允許wheel組和myguest組的用戶登錄AllowUsers teczm authen@192.168.8.5 #允許來自以上組的teczm用戶和authen用戶登錄,#且authen用戶只能從主機192.168.8.5登錄#DenyGroups #拒絕登錄的組,參數設置和AllowGroups一樣#DenyUsers #拒絕登錄的用戶,參數設置和AllowUsers一樣#AllowTcpForwarding yes #是否轉發的TCP包都被允許。默認是 “yes”。LoginGraceTime 60 #60秒內客戶端不能登錄即登錄超時,sshd切斷連接。KeyRegenerationInterval 1800 #1800秒(30分鐘)后自動重新生成服務器的密匙。MaxStartups 3 #設置同時發生的未驗證的并發量,即同時可以有幾個UseDNS no #不使用DNS查詢客戶端。PermitRootLogin no #不允許root登錄,root可由wheel組用戶登錄后su。X11Forwarding no #禁止用戶運行遠程主機上的X程序,我沒有X,所以無所謂。UseLogin yes #禁止X11Forwarding#認證配置(口令認證、PAM認證、非對稱密鑰認證任選其一)#口令認證PubkeyAuthentication no #不使用非對稱密鑰認證PasswordAuthentication yes #使用口令認證PermitEmptyPasswords no #不允許使用空密碼的用戶登錄#PAM認證PasswordAuthentication no #不使用口令認證UsePAM #使用pam認證ChallengeResponseAuthentication yes #允許挑戰應答方式#非對稱密鑰認證PasswordAuthentication no #不使用口令認證PubkeyAuthentication yes #使用非對稱密鑰認證AuthorizedKeysFile .ssh/authorized_keys #用戶認證使用的公鑰。

更多詳細內容請查看:http://www.111cn.net/sys/linux/57339.htm


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 屯昌县| 烟台市| 泗洪县| 永康市| 济源市| 黑山县| 织金县| 贵阳市| 苍山县| 石林| 宣恩县| 元氏县| 广饶县| 德昌县| 开江县| 滨州市| 罗源县| 扎赉特旗| 留坝县| 宜州市| 天台县| 南溪县| 新丰县| 嵊泗县| 五华县| 鹤山市| 安陆市| 基隆市| 万安县| 许昌县| 金川县| 临朐县| 崇阳县| SHOW| 融水| 凌云县| 商洛市| 敦煌市| 逊克县| 花莲县| 淮滨县|