4 ms·
In that case, use an ssh-agent and agent forwarding. Then you only need your private key on the box you're actually sitting at.
by frodwith 16y ago
In that case, use an ssh-agent and agent forwarding. Then you only need your private key on the box you're actually sitting at.
- mbreese 16y agoUnless you want to use headless logins... An example would be a cron job that copies files to a backup server via scp or rsync over ssh. However, this should also be accompanied by host filters in the authorized_keys file to restrict access to specific hosts. Using pastebin for this is wrong on so many levels.
- barrkel 16y agoAutomating ssh, however, is surprisingly painful.
- rcoder 16y agoThis is why Net::SSH and Paramiko are so wonderful. Using the OpenSSH binaries through a pair of pipes is certainly a pain, but if you grok the protocol, either of those libraries can make it really easy to wire up secure pipes between machines.
- jsn 16y agoFor obvious reasons, you're much better off generating a new keypair for that (not reusing any existing private keys).
- wizard_2 16y agoWith python you have Fabric and paramiko which makes automating ssh very strait forward.
- danieldon 16y agoWhy wouldn't you just generate a new key pair?