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

首頁 > 服務器 > Web服務器 > 正文

windows 7架設OpenSSH服務器實踐

2024-09-01 13:47:38
字體:
來源:轉載
供稿:網友
這篇文章主要介紹了windows 7架設OpenSSH服務器實踐,需要的朋友可以參考下
 

最近有個想法就是在自己的電腦開個ssh服務,然后在遠程如果需要在自己電腦上工作的時候就只需要ssh連接到自己的電腦然后用mstsc remote desktop連接到自己的電腦IP上就可以了。

1.下載OpenSSH
2.安裝,反正我是全都默認一路走下來,期間跳出個窗口說要編輯passwd文件的警告,OK繼續搞下去。
3.切換到SSH安裝目錄下的bin
4.

 

復制代碼代碼如下:

# create the default groups
mkgroup -l >> ../etc/group
#create the default users
mkpasswd -l >> ../etc/passwd
# Note: for neither of the above commands did I bother with the domain version documented in the quickstart
# Now, if you look in ../etc/passwd, you will see entries (one per line) for all your Windows users.
# Start the server in debug mode
cd ../usr/sbin
sshd -d -d -d

 

5.出現如下提示

 

復制代碼代碼如下:

debug1: sshd version OpenSSH_3.8.1p1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/etc/ssh_host_rsa_key' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /etc/ssh_host_rsa_key
Could not load host key: /etc/ssh_host_rsa_key
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/etc/ssh_host_dsa_key' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /etc/ssh_host_dsa_key
Could not load host key: /etc/ssh_host_dsa_key
Disabling protocol version 2. Could not load host key
sshd: no hostkeys available -- exiting.

 

6.可以看出是配置文件的權限沒有配置好,于是chown chmod之

 

復制代碼代碼如下:

cd ../../etc
../bin/chown <username> *
../bin/chmod 600 *

 

7.發現貌似cygwin的dll文件出了問題,參考貼里面提供了更新的dll文件的鏈接cygintl-2和cygwin1.dll,地址是http://samanthahalfon.net/resources/cygwin_includes.zip,將其中的兩個dll解壓覆蓋bin目錄下的老文件,如果提示權限不足,可能是因為cygrunsrv進程還是活著的,使用了這個dll文件,殺掉cygrunsrc進程完成替換

8.重啟opensshd服務

net start opensshd

9.系統提示服務啟動成功,我們可以用ssh命令或者putty來試驗一下

 

復制代碼代碼如下:

ssh <username>@<ip_windows_machine>
# You will be prompted to accept the authenticity of host, type yes
# You will be prompted for a password

 

# Enter your windows password

 

10.試驗成功,連接到自己的機器了

備注:

sshd -d -d -d執行不了,但是不影響啟停openssh服務的進程。
sshd.exe – 系統錯誤
無法啟動此程序,因為計算機中丟失 cygcrypto-0.9.7.dll。嘗試重新安裝該程序以解決此問題。

windows 7架設OpenSSH服務器實踐



發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 盐城市| 徐水县| 绥宁县| 黎平县| 遂平县| 郑州市| 潼关县| 宜宾县| 渑池县| 萍乡市| 喀喇沁旗| 高台县| 濉溪县| 教育| 泉州市| 莫力| 锦州市| 溆浦县| 中卫市| 抚松县| 苍南县| 潢川县| 樟树市| 榕江县| 教育| 渝中区| 平武县| 莲花县| 张掖市| 宝兴县| 洛川县| 紫阳县| 武威市| 六枝特区| 旺苍县| 余姚市| 辛集市| 眉山市| 泊头市| 龙井市| 盐亭县|