How to forward local keypair in a SSH session?

后端 未结 3 952
南笙
南笙 2020-12-23 13:24

I manually deploy websites through SSH, I manage source code in github/bitbucket. For every new site I\'m currently generating a new keypair on the server and adding it to g

3条回答
  •  盖世英雄少女心
    2020-12-23 14:06

    This turned out to be very simple, complete guide is here Using SSH Forwarding

    In essence, you need to create a ~/.ssh/config file, if it doesn't exist.

    Then, add the hosts (either domain name or IP address in the file and set ForwardAgent yes)

    Sample Code:

    Host example.com
        ForwardAgent yes
    

    Makes SSH life a lot easier.

提交回复
热议问题