但可以在 .ssh/config 設定 host name 和 url、port,之後就可僅用 host name 連線。
vim ~/.ssh/config :
Host hq
HostName server.url
Port 9999
User zero
之後要連線時打「hq」即可:
- ssh hq
- git remote add origin hp:/path/to/repository
Reference:
git - Using a remote repository with non-standard port - Stack Overflow
沒有留言:
張貼留言
除非必要,請不要在回覆時留下您的敏感資訊 (電話、email、地址等)