Windows安裝OpenSSH的注意點

2022-09-14 12:45:12 字數 1496 閱讀 2234

1、堅信windows自帶的openssh是比較好用的

補充乙個防火牆規格的shell指令碼,便於複製。

# confirm the firewall rule is configured. it should be created automatically by setup. run the following to verify

if (!(get-netfirewallrule -name "openssh-server-in-tcp" -erroraction silentlycontinue | select-object name, enabled)) else

2、解決問題過程中遇到的問題

​ (1) ssh轉殖windows倉庫的位址命名規則

#git clone 使用者名稱@主機位址或主機名:具體的倉庫位址

#使用者名為windows使用者名稱,可在windows設定功能中新增git使用者

#主機位址為ip位址或者主機名

#倉庫位址若在d盤test資料夾,則需要用/d/test,而不是d:/test

#否則報找不到倉庫的錯誤

please make sure you h**e the correct access rights

and the repository exists.

​ (2) 配置openssh預設使用的shell

# 注意bash.exe的路徑使用你自己的

new-itemproperty -path "hklm:\software\openssh" -name defaultshell -value "c:\program files\git\bin\bash.exe" -propertytype string -force

defaultshell : c:\linxy\software\git\git\bin\bash.exe

pspath : microsoft.powershell.core\registry::hkey_local_machine\software\openssh

psparentpath : microsoft.powershell.core\registry::hkey_local_machine\software

pschildname : openssh

psdrive : hklm

psprovider : microsoft.powershell.core\registry

# 注意powershell.exe使用你自己的

new-itemproperty -path "hklm:\software\openssh" -name defaultshell -value "c:\windows\system32\windowspowershell\v1.0\powershell.exe" -propertytype string -force

還原shell也可以參考官網資訊

Linux下shell中採用openssl加密

參考 這篇文章寫得非常好,給滿分 下面附上自己對照著擼出來的 僅僅當作筆記記錄 bin bash password gmengine 123 echo password openssl enc aes 256 cbc s 1ae3b897 out pass.aes pass pass 1231kj1...

不重新編譯PHP給php增加openssl模組記錄

引用 yum y install openssl usr local bin 是php的安裝目錄 切換到php安裝目錄的etx openssl目錄 cd root soft php 5.2.8 ext openssl 引用 usr local bin phpize cannot find confi...

windows服務安裝

1.有安裝程式時 正常情況下,我們開發windows服務時,會同時建立乙個安裝程式 然後執行命令列安裝。cd c windows microsoft.net framework v4.0.30319 回車 或建立bat systemroot microsoft.net framework v4.0....