scp
両方のサーバーに異なるSSHキーが必要な場合は、サーバーを複製するためにサーバーのコマンドにどのパラメータを使用する必要がありますか?私はPC(私がコマンドを出すPC)scp
からデータストリーミングなしであるサーバーから別のサーバーにファイルを転送する方法を知っています。
に基づいてこのチュートリアル、私の起動コマンドは次のとおりです。
scp -r [email protected]:/home/miguel/ [email protected]:/home/miguel/
ベストアンサー1
例:
# start the agent and capture its environment in the current shell
eval `ssh-agent`
# add keys needed to connect to the different accounts
ssh-add /path/to/first/ssh/key
ssh-add /path/to/second/ssh/key
# do the copying
scp [email protected]:file1 [email protected]:file2