R's Workshop

Test SSH Connection without Login

為了簡化每到新 build code server 上都要把所有的 gerrit server 都先 ssh access 過一次的繁瑣步驟, 最好的方式就是寫一個腳本去做這件事.

Test SSH Connection

-o StrictHostKeyChecking=no 就不會跳出 “Are you sure you want to continue connecting?” 要求你輸入 ‘yes’ 了

# The default git port of Gerrit is 29418
ssh -o StrictHostKeyChecking=no -p 29418 user@your.server

Reference

Linux Git Gerrit