[NA HW2-1] OJ連上Router的方式

133 views
Skip to first unread message

文雅嫻

unread,
May 7, 2026, 4:34:26 AMMay 7
to NYCU NASA 課程討論區
助教好:
請問HW2-1中OJ是會用judge這個帳號搭配public key登入router操作嗎?要如何取得key?謝謝助教!

曹琇雅

unread,
May 9, 2026, 12:44:08 PM (12 days ago) May 9
to NYCU NASA 課程討論區
同學好

HW2-1 中 OJ 確實是用 judge 帳號搭配 public key 登入 Router 操作
OJ 的 public key 為 `ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHuv5e0N6yw90gqR5FbIqQAcRLERui3fqPsxmJ1Wcm3+ nasaoj-hw2 `
請協助驗證 OJ 能不能存取到你的 Router,謝謝

Best regards,
TA hytsao
xian...@nycu.edu.tw 在 2026年5月7日 星期四下午4:34:26 [UTC+8] 的信中寫道:
助教好:
請問HW2-1中OJ是會用judge這個帳號搭配public key登入router操作嗎?要如何取得key?謝謝助教!

黃哲宇

unread,
May 9, 2026, 1:02:12 PM (12 days ago) May 9
to NYCU NASA 課程討論區
助教好:
我也遇到相同的問題,經查於Router /home/judge/.ssh/authorized_keys 有 OJ 的 public key,但 OJ 仍無法存取到我的 Router 或其他 VM,再麻煩助教協助排查,謝謝

Best regards,

hsiuy...@nycu.edu.tw 在 2026年5月10日 星期日凌晨12:44:08 [UTC+8] 的信中寫道:

曹琇雅

unread,
May 9, 2026, 2:56:38 PM (12 days ago) May 9
to NYCU NASA 課程討論區
同學好:

請協助 Add the public key to router AND CP1 for judge user
剛也在 OJ 新增了文字提示,再請協助確認是否有其他問題

大大感謝

Best regards,
TA hytsao



hcy11155...@nycu.edu.tw 在 2026年5月10日 星期日凌晨1:02:12 [UTC+8] 的信中寫道:

林俊良

unread,
May 10, 2026, 10:33:28 PM (11 days ago) May 10
to NYCU NASA 課程討論區
助教好,我已在 router 與 CP1 都建立 judge 使用者,並加入 OJ public key

router 的 sshd 監聽 0.0.0.0:22,sshd -T 顯示 pubkeyauthentication yes,authorizedkeysfile 正常。/home/judge/.ssh/authorized_keys 權限也已確認正確。

但我提交 OJ 時在 router 上監看:

sudo tcpdump -ni any 'tcp port 22 and not host 192.168.200.250'

結果是 0 packets captured。journalctl -u ssh 也沒有 judge / Failed publickey / Invalid user 紀錄。

hsiuy...@nycu.edu.tw 在 2026年5月10日 星期日凌晨2:56:38 [UTC+8] 的信中寫道:

文雅嫻

unread,
May 15, 2026, 10:46:43 PM (6 days ago) May 15
to NYCU NASA 課程討論區
助教好:
請問目前OJ的HW 2-1還在修復中嗎? (preflight輸出的內容是empty)
另外想請問: ppt上的說明要求 Static Pod 的container port要開在80,但是 testcontainers/helloworld:1.3.0 這個image本身是聽 8080/8081 port,這對OJ測試有影響嗎?
謝謝!

lin710277...@nycu.edu.tw 在 2026年5月11日 星期一上午10:33:28 [UTC+8] 的信中寫道:

曹琇雅

unread,
May 18, 2026, 10:47:10 PM (3 days ago) May 18
to NYCU NASA 課程討論區
同學好:

補充 testcontainers/helloworld:1.3.0 的 port 相關說明,該 image 正確規格是監聽 8080 與 8081 port。
雖然實測 port 80 容器也能動,目前 OJ 腳本已相容(Port 80 / 8080 皆可通過),但 80 port 並非正規做法。

另外,OJ HW2-1 preflight 產生 empty stdout 的問題也已修復。

再麻煩同學協助測試確認,謝謝!

Best regards,
TA hytsao

xian...@nycu.edu.tw 在 2026年5月16日 星期六上午10:46:43 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages