0

I'd like to backup the package list(dpkg) of some remote computers to a backup server: all of them running Debian. I already configured the rsa key to login remotely as root on the other computers without authentication. How can I run a command like "dpkg --get-selections > file" on the remote computers to save the package list, so my backup server can copy those files?

blade
  • 113
  • 4

1 Answers1

2

You can use ssh. For example: ssh root@server -c "dpkg --get-selections" > localfile.txt

shodanshok
  • 44,038
  • 6
  • 98
  • 162