return a ssh command line that can be prefixed to a borg command line
(self, location)
| 722 | return env_vars + [remote_path, "serve"] + opts |
| 723 | |
| 724 | def ssh_cmd(self, location): |
| 725 | """return a ssh command line that can be prefixed to a borg command line""" |
| 726 | rsh = self._args.rsh or os.environ.get("BORG_RSH", "ssh") |
| 727 | args = shlex.split(rsh) |
| 728 | if location.port: |
| 729 | args += ["-p", str(location.port)] |
| 730 | if location.user: |
| 731 | args.append(f"{location.user}@{location.host}") |
| 732 | else: |
| 733 | args.append("%s" % location.host) |
| 734 | return args |
| 735 | |
| 736 | def call(self, cmd, args, **kw): |
| 737 | for resp in self.call_many(cmd, [args], **kw): |