Why We Need a Middleman: Understanding SSH Jump Hosts

Connecting to remote servers directly over the internet can be a recipe for disaster. Let’s explore why SSH jump hosts are a secure and efficient solution, along with how they typically work. The Problem: Wide Open Gates Imagine a network with critical servers tucked away behind a firewall, like a medieval city within a fortified wall. Directly connecting (SSH) to these servers from the open internet would be like leaving the city gates wide open – anyone could potentially exploit a vulnerability and gain unauthorized access....

June 17, 2024 · 3 min · 500 words · Chun-Hung Tseng

Making contributions to linux kernel upstream

自己上 patch 到 linux kernel mailing list 的筆記。 kernel 開發筆記 vim 設定 :set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab cindent cc=80 編譯 make defconfig && make -j $(nproc) 檢查 ./scripts/checkpatch.pl --patch 使用 sparse -> make C=1 LKML 上提交 patch Generate patch Generate patch git format-patch HEAD~ With versioning git format-patch -v3 HEAD^ Apply patch git am [patch filename] Setup email using gmail on Ubuntu sudo apt install git git-email Get app password from here Edit ~/....

June 17, 2024 · 1 min · 145 words · Chun-Hung Tseng

Diary - June 13, 2024

Draft 堆了很多,但是都沒有完整寫完可以發表的,為了端正這個風氣,先從改成寫日記開始 :D,然後陸續清倉完成 draft 的稿子。 KubeCon 雜想 以前看 Jserv 在推學生去各大會議演講,CosCup 也好 Open source summit 也好,總因為覺得離自己太遙遠,所以都一直對自己說那些都是自己碰不到的大神,不用跟他們比。但是鴕鳥心態久了,也就把自己也催眠了,直到今年三月第一次去了大型的 Conference (KubeCon),對我衝擊非常大非常深,有種相見恨晚早知道以前也多跑會議了,畢竟眼界開了,野心也大了。 很多 open source project 的 maintainer 都在場可以交流,我也運氣很好,經過兩天跟很多人尬聊之後,找到了一個跟工作和興趣有關的開源專案 etcd,從今年三月起就開始深耕,目前算是挺順利,社群的人都非常 supportive,短短兩個月學到好多東西。 聽了很多演講開了眼界,自己組上的同事也站上台演講了。其實只要自己克服對自己的恐懼跟抱著分享交流的心,剩下就是 go for it 就對了啊! 在 KubeCon Paris 遇到了一個 HR,當時聊天時她問我說,感覺你的 background 很有趣,興趣挺廣的,但是你最專精的是什麼呢?這真的是敲響了警鐘! 我審視了我正在進行中但是因故一直拖延的許多專案,比方說 Jserv 老師的 sysprog21 下分配到的 Github issue、maintain rclone 的 backend、完成一次自己的 raft 實作等等,很多都起了個頭,但是沒有完成。回顧過去幾年在學習的時候,探索了好多好多領域,但是火力過度分散而且都有點三分鐘熱度。做 open source 也是一樣,很多都是研究了一兩個月後,就因為新東西更有意思就擱置了進行中的東西。雖然前後陸續碰了很多不同的專案,中間也因為有些成果所以對找工作有點幫助,但是對每一個領域都沒有深耕下去,很不踏實也沒有自己的護城河。 在業界做了四年,一點 senior engineer 的樣子都沒有。 上半年收尾 Opsn source summit 有開源開發者的特惠票,很開心有申請到!以後每年就是努力的多多參加會議,也多投稿來督促自己要一直努力往前走。 日記也要踏實開始寫,畢竟書寫雖然耗時,但是每次有留下筆記的東西,總是都會是吸收最完成且思路最清楚的。 etcd 那邊有四五個 PR queue 在 draft state,月底前要力拼全部都弄好被 merge。...

June 13, 2024 · 1 min · 89 words · Chun-Hung Tseng

Infer Docker Image

In order to leverage the latest Infer features to check all C/C++ and Python source code in rv32emu, we need to compile it from source, since at the time of writing, the official release version is stuck at v1.1.0 from May, 2021. The daily build is triggered and pushed to sysprog21’s Docker Hub infer repo at UTC+8 0:00 every day. Notice that this Docker image only runs on x86. The dockerfile Here are the dockerfiles behind each of the daily build....

March 5, 2024 · 3 min · 554 words · Chun-Hung Tseng

rv32emu Development Image

This dockerfile didn’t make it into the upstream repo because of “the specific utilization context of Docker images, which are designed to streamline deployment processes for particular objectives, rather than encompassing a comprehensive solution”. But nevertheless, I am using it for my day-to-day development on my M1 Macbook, and I find it useful since it won’t pollute my MacOS and also provides Linux-like environment. Hopefully you will find this useful, too!...

March 4, 2024 · 3 min · 442 words · Chun-Hung Tseng

My .vimrc

My simple .vimrc file which I am using for servers. .vimrc Just copy the following text and paste it to ~/.vimrc, open vim, and you are good to go! :) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 set number " Show line numbers set mouse=a " Enable inaction via mouse set showmatch " Highlight matching brace set cursorline " Show underline set cursorcolumn " Highlight vertical column set ruler " Show row and column ruler information filetype on " Enable file detection syntax on " Syntax highlight set expandtab " For python code indentation to work correctly set autoindent " Auto-indent new lines set shiftwidth=2 " Number of auto-indent spaces set smartindent " Enable smart-indent set smarttab " Enable smart-tabs set tabstop=2 " Number of spaces per Tab " ---------Optional---------- set undolevels=10000 " Number of undo levels set scrolloff=5 " Auto scroll set hlsearch " Highlight all search results set smartcase " Enable smart-case search set ignorecase " Always case-insensitive set incsearch " Searches for strings incrementally highlight Comment ctermfg=cyan set showmode set encoding=utf-8 set fileencoding=utf-8 scriptencoding=utf-8 set backspace=indent,eol,start

March 4, 2024 · 1 min · 206 words · Chun-Hung Tseng

2024 - 新年目標

離滿 30 歲還有一年多一點的日子裡,希望自己可以有大幅度的成長。現在回頭看如果開始已經有遺憾,就要趕快加把勁衝了。 過去的幾年裡雖然做了很多事情、遇到了很多很棒的人、學習到很多新東西,但是技術面來說,都很廣但是不精。 在這麼些時間的摸索之後,今年的目標很單純,集中火力在幾個固定的領域,向下扎根。誠實面對自己的不足,往前邁進。也要把別認對你的付出跟期待,用相等甚至更大的力度,回報給人家。 在未來幾天這會是個 living document,但是三月中後,就會是年底回顧的起點,希望年底時的我,不會對自己感到失望。 主線任務 這邊主要會列出核心任務+預期執行方法,每個月都回頭來檢討。 寫(技術)文章 其實我的文件撰寫數量一直以來都挺多的(在公司離職時甚至是同事們致謝的項目之一?),但是沒有穩定的輸出之下就會缺乏自我督促的感覺,加上筆記如果公諸於世,這樣才會對自己的產出品質更在意,也可以更方便於年度回顧。 寫文章的時候可以整理自己的思緒,也可以讓自己未來檢索跟回顧時方便些。 目標:手上有在做的東西,每一週至少寫一篇總結,記錄下發展過程。中英文不限,但是要有質量。 Linux 核心設計/實作 Jserv 老師今年可能是最後一次開設 Linux 核心設計/實作了 QQ。從 2021 年認知到堂課的存在之後,因緣際會下開始了 scheduler 的相關實驗跟討論,一路到離職去讀書都斷斷續續有在投入,甚至因此而有機會在 Oracle 寫碩論。 但是,回顧開始跟老師討論以來,該投入回報給老師的時間,我自知理虧,都沒有達成,沒有一件事情是完整的從到到尾做完。感謝老師都一直沒有放棄我,時不時會給予關心,今年,要終結掉這個爛循環。 目標:誠實面對自己,往前走。沒有藉口,該怎麼投入就怎麼投入。 rv32emu + scheduler 書籍 + sysprog21 底下之開源貢獻 Jserv 老師陸續有只配任務,但是我的完成度跟效率之低…,哎 過去的事情也解救不了了,但是 moving on 就是要重新來過。編譯器、模擬器、作業系統等等議題在 sysprog21 底下都有對應的專案,要好好學習。 目標:分配的任務,沒有藉口,該怎麼投入就怎麼投入。 rclone 開源維護 rclone 在去年寫碩論最低潮的時期,我出於自己備份資料的需求而貢獻了 ProtonDrive backend。但是在一個月的密集貢獻之後,我就沒有繼續維護了。近期有不少 issue 被拋出,該認真的對使用者們負責啦! 目標:一週投入數小時去維護程式碼品質跟運作。 DevOps 工作相關議題的探索 今年是工作的第三年,總算換到了我一直想要嘗試的 DevOps 領域(畢竟我覺得軟體開發有機會靠開源跟合作來實現,但是 DevOps 比較難),所以給自己一兩年的時間來好好探索。但是既然入坑,就要認真摸。 目標:CKA+CKAD+CKS 在六月底之前考過。 支線任務 法語 生活在法語區四年多了,但是還是 read-only 的狀態,我覺得很不應該。 目標:年底前擁有 A2 聽說讀寫的能力。...

February 29, 2024 · 1 min · 75 words · Chun-Hung Tseng

Hello world!

這是這個 blog 的第一篇文章 :) 就用了這很俗的標題 XD 以前就一直有在寫文章,但是回顧了一下大部分都是大學練 competitive programming 時代所留下,偶而參雜一些 side project 筆記(面試時甚至還有用上!),但是產出非常的沒有穩定性。 2024 的新年目標之一:透過每週至少寫一篇筆記的方式,督促自己穩定學習成長,也訓練自己的文筆,把自己的筆記公諸於世讓大家公審。 誠實面對自己 by Jserv 黑歷史 一路上換過了幾個 theme,甚至是 static site generator ,還有平台。 不得不說,以前的我還比較會嚐鮮,現在怎麼都這麼沒好奇心了呢?!(Github 推出 static site 時就開始用了,Hugo 也是) 生活雜記類在 wordpress Coding 黑歷史相關 2019/1/26 ~ 2021/11/9 Leetcode + side project (程式競賽 judge 環境搭建, VPN using home IP as exit IP, Raspberry Pi 4 kernel compilation) 2018/1/13 ~ 2018/9/27 Leetcode(應該是當年準備第一次面試 Google 的刷題紀錄。這是個瘋狂回憶,畢竟我記得為了高強度提升自己,一天刷十題,連續刷了一個多月。眼睛張開就是 Leetcode 刷到後來有點行屍走肉…) 2017/10/9 ~ 2018/1/12 Competitive programming 題解 + 上課講義(第一次站在講台上教資料結構演算法,也是段特別的回憶。常常在上課十分鐘前才定稿呢…) 2016/8/2 ~ 2017/5/19 Competitive programming 題解 (原來曾經的我這麼強啊…)

February 29, 2024 · 1 min · 80 words · Chun-Hung Tseng