發表文章

買個 HTTP SSL 憑證

圖片
自從 sslforfree 及 letsencrypt 有提供免費憑證後, 就很少參與付費買憑證這種事    https://www.sslforfree.com/     https://letsencrypt.org/zh-tw/  後來連 wildcard 也跟著免費了  https://community.letsencrypt.org/t/acme-v2-production-environment-wildcards/55578 但, 在商業應用上, 為了某些因素還是得買個有效長一點的憑證, 才不會拿出來感覺像是詐騙網站 搜尋一下網路上賣憑證的廠商超級多的, 實在不知道該如何比較.. 後來我只能稍微檢查一下, 看看瀏覽器內的內建憑證商, 有哪些憑證有效期間比較長來選擇 這裡有些基本的憑證資訊要先理解一下,  買起來才會順利 https://haway.30cm.gg/ssl-key-csr-crt-pem/ 申請的流程 1.需要先有個私鑰 Private Key 2.還需要有簽署憑證須求檔 CSR 3.再來提交到網站上, 他就會給你生成的 CRT 憑證, 及 PEM or CRT 中繼憑證 以  https://cheapsslsecurity.com/ 為例, 你先選擇 SSL 憑證廠牌後, 在選擇需要的憑證格式 付款後就會進入生成憑證的流程.  但還是需要先生成 Private Key 才可以 可以用 openssl 工具產生KEY and CSR ubuntu@hk:~/csr$ openssl req -new -newkey rsa:2048 -sha256 -nodes -out wildcard.apptest.com.csr -keyout wildcard.apptest.com.key -subj "/C=HK/ST=Queenswat/L=Admiralty/O=Topplayer/OU=IT/CN=*.apptest.com" 這裡我生成的是一個 Wildcard 的萬用字元憑證, 網站會依據 csr 生成簽署過後的 CRT 給你, 通常會是一個 ZIP 壓縮檔.  因為商業銷售與代理機制的關係, 所以通常不會是由 ROO...

LibreOffice Draw 可以編輯PDF

圖片
 昨天最驚訝的事, 一直有再用的 LibreOffice 的軟體,  LibreOffice Draw 可以編輯PDF LibreOffice Office 編輯PDF 原來在 WIKI 都有寫了, 沒遇到還真的不知道. 這樣 Adobe Acrobat 難怪要轉往雲端發展了. XDXD 馬上下載來玩玩吧!!! https://zh-tw.libreoffice.org/  

xshell 3.0 無法登入 ubuntu 2004 LTS 版本

圖片
當你的 xshell or ssh client 無法登入新版的ssh server... no matching key exchange method found. Their of offer: diffie-hellman-group1-sha1. * 錯誤訊息應該長得雷同 # tail /var/log/auth.log Apr 24 13:43:45 mtchang sshd[1537]: Unable to negotiate with 172.24.0.201 port 61949: no matching cipher found. Their offer: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se [preauth] * 降版本應該可以好 root@mtchang:~# tail -n 5 /etc/ssh/sshd_config Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 root@jutainet:~# /etc/init.d/ssh restart Restarti...

Ubuntu 19.10 LTS Mini. install 調整Linux內部預設時區

圖片
Ubuntu 19.10  LTS Mini. install 調整Linux內部預設時區 最小安裝 ubuntu 的時候,預設都是設定 UTC +0 的時區,有時候真的很難對時間。 Ubuntu 只要透過安裝 tzdata 就可以設定預設時間了  sudo apt-get install tzdata 如果你已經設定過了,可以透過 sudo dpkg-reconfigure tzdata 重新設定。 詳細過程如下: jangmt@instance-1-tokyo:/usr/share$ sudo apt-get install tzdata Reading package lists... Done Building dependency tree      Reading state information... Done The following NEW packages will be installed:   tzdata 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 208 kB of archives. After this operation, 3534 kB of additional disk space will be used. Get:1 http://asia-northeast1.gce.archive.ubuntu.com/ubuntu eoan/main amd64 tzdata all 2019c-3 [208 kB] Fetched 208 kB in 1s (171 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package tzdata. (Reading database ... 63700 files and directories currently installed.) Preparing to unpack .../tzdata_20...

xshell 舊版無法登入新版的ubuntu ssh 問題

圖片
ssh 使用加密演算法報錯unknown cipher type 找出目前這個版本的 ssh 支援的加密演算法 ssh -Q cipher localhost | paste -d , -s - * 到 /etc/ssh/sshd_config 加到最後面,重新啟動 sshd 就可以了...!! * 把生成的變數參考,可能長的類似下面的,把它貼入 config 。 Ciphers 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,arcfour128,arcfour256,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com Ciphers 3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com ref: http://mgalgs.github.io/2014/10/22/enable-arcfour-and-other-fast-ciphers-on-recent-versions-of-openssh.html 圖文不相關 圖文不相關-東京塔 HERMES 圖文不相關

新手工程師練習實作參考

圖片
### 新手工程師練習實作參考 * 因為要學習WEB寫程式的範圍很廣泛,所以這裡提供一個快速的實作目標,讓你快速通過新手村。 * 詳細可以參考這篇: https://github.com/goodjack/developer-roadmap-chinese web developer 但是看完後,多數人會直接放棄。 * 底下提供比較簡單開始的新手村,讓開發者可以自己練習。 * 指說明需要完成的元素,內容請自行想像與設計。當成一個屬於自己的作品呈現空間。 ### 使用純文字編輯器操作系統 * Sublime https://www.sublimetext.com/ * VSCODE https://code.visualstudio.com/ * ATOM https://atom.io/ * NotePAD++ https://notepad-plus-plus.org/zh/ * 熟悉上面至少 2 套文字編輯器,並且可以使用他的外掛。 ### 使用 github 建立一個屬於自己的網站。 * 選一個 GIT 工具, https://git-scm.com/download/gui/windows , 可以選 SourceTree 或 https://git-scm.com/download/win * 需要能夠透過 git 工具上傳及維護網站。 * 了解 git 的 pull , clone , merge, getch, commit, push, add 功能與用法 * 了解 branch, master, orign 使用上的意義 * 參考: https://gitbook.tw/chapters/github/using-github-pages.html ### 使用 bootstrap 4 規劃你的網站版面 * 參考: https://getbootstrap.com/docs/4.1/examples/ * 使用 Grid 排版,編排出一個可以放作品的網站版型。 * 可以善用 bootstrap 的各種元件,完成你的目標。 * 調整你的版面, 讓他在 Mobile 環境下,也可以不會太糟糕。 * 使用自訂的 CSS 讓你的 Bootstrap 4 看起來和別人不一樣。 ### 使用 Jquery 的 API * 使用...

保證瀏覽器連到 https 的功能 (HSTS)

圖片
因為最近遇到一個特殊的 TLD 最上層的網域, 「.app」 ,這個網域預設 HSTS Preload 功能。 這功能一旦被開啟後,歡樂的時光就來臨了...... 網域的擁有者也可以自己設定,HSTS Preload 設定下去,所有連線都需要 SSL 的功能 ,於是它就有了 1. 無論是否有設定 HTTPS ,瀏覽器都會轉向 HTTPS 2. 可以抵禦SSL剝離攻擊,防網站劫持。 3. 不能隨意關掉 HTTPS,萬一憑證不見或過期,只好被 BROWSER 檔掉或警告。 4. HSTS會在一定時間後失效(有效期由max-age指定) ,但是沒有人會只設定一天過期。 * 你可以到這裡檢查,網址是否被 HSTS Preload 了....   * https://hstspreload.org     * 如果設定了,但是時間還沒有過期你可以參考這裡暫時移除   * https://www.thesslstore.com/blog/clear-hsts-settings-chrome-firefox/   * https://ephrain.net/chrome-%E5%B0%87%E7%B6%B2%E7%AB%99%E5%BE%9E-hsts-%E6%B8%85%E5%96%AE%E4%B8%AD%E7%A7%BB%E9%99%A4/   * https://blog.bennyling.cc/362/clear-google-chrome-hsts-setting /    * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security 目前已經支援的瀏覽器