https.js 無(wú)法運(yùn)行
E:\NodeJS>node https.js
fs.js:640
? return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
? ? ? ? ? ? ? ? ?^
Error: ENOENT: no such file or directory, open 'E:\NodeJS\ssh_key.pem'
? ? at Error (native)
? ? at Object.fs.openSync (fs.js:640:18)
? ? at Object.fs.readFileSync (fs.js:508:33)
? ? at Object.<anonymous> (E:\NodeJS\https.js:5:9)
? ? at Module._compile (module.js:556:32)
? ? at Object.Module._extensions..js (module.js:565:10)
? ? at Module.load (module.js:473:32)
? ? at tryModuleLoad (module.js:432:12)
? ? at Function.Module._load (module.js:424:3)
? ? at Module.runMain (module.js:590:10)
2016-10-04
Error: ENOENT: no such file or directory, open 'E:\NodeJS\ssh_key.pem'
這個(gè)文件打開(kāi)失敗了。看看這個(gè)目錄下有沒(méi)有這個(gè)文件
2017-12-20
我最后是 用阿里云他們生成好的用了。
2017-12-11
具體如何生成 這個(gè)問(wèn)題有人能回答一下嗎
2016-12-17
#### 使用 openssl 命令創(chuàng)建 privatekey.pem 和 certificate.pem(對(duì)應(yīng)視頻中的ssh_key.pem和ssh_cert.pem):
? ? ? openssl genrsa -out privatekey.pem 1024?
? ? ? openssl req -new -key privatekey.pem -out certrequest.csr
? ? ? openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem -days 365 //控制有效期限為365天,默認(rèn)為30天
? ?
#### 出現(xiàn)錯(cuò)誤
在win7下使用openssl
openssl genrsa -out privatekey.pem 1024 ? //成功創(chuàng)建
openssl req -new -key privatekey.pem -out certrequest.csr ?//報(bào)錯(cuò),信息如下
unable to load config info from /usr/local/ssl/openssl.cnf
原因?yàn)檎也坏給penssl.cnf文件
#### 解決方案
1. 在Git/usr/ssl/下可找到該文件
2. 將該文件復(fù)制到c盤(pán)根目錄下
3. 執(zhí)行命令openssl req -new -key privatekey.pem -out certrequest.csr -config C:\openssl.cnf
2016-11-02
感覺(jué)要自己生成,我安裝了openssl后就不知道怎么破,好像還要弄點(diǎn)其它東西。有沒(méi)有人知道怎么簡(jiǎn)單生成私鑰和證書(shū),求解答。
2016-10-05
。。沒(méi)有,怎么辦