2009年2月26日 星期四

教學 / 不使用密碼的SSH連線 - ssh-keygen

環境介紹 (windows 使用putty pietty 連線也可以,後面會說明)


A電腦 192.168.1.1- 要被連線的主機
B電腦 192.168.1.2- 使用SSH連線到A電腦的主機


小明 在 A主機 有一個使用者帳號 A_min
       在 B主機 有一個使用者帳號 B_min


環境設定 - A主機


# vi /etc/ssh/sshd_config


 


RSAAuthentication yes
PubkeyAuthentication yes 
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no  (如果不想讓使用者使用密碼登入的話再設定)

# service sshd restart 

如何在 golang 裡面引用 gitlab private repo

參考文章:https://stackoverflow.com/questions/27500861/whats-the-proper-way-to-go-get-a-private-repository 原文是用 gitlab.company.com 當範例,這邊改成一般帳號...