return a ssh command line that can be prefixed to a borg command line
(self, location)
| 424 | return env_vars + [remote_path, "serve"] + opts |
| 425 | |
| 426 | def ssh_cmd(self, location): |
| 427 | """return a ssh command line that can be prefixed to a borg command line""" |
| 428 | rsh = self._args.rsh or os.environ.get("BORG_RSH", "ssh") |
| 429 | args = shlex.split(rsh) |
| 430 | if location.port: |
| 431 | args += ["-p", str(location.port)] |
| 432 | if location.user: |
| 433 | args.append(f"{location.user}@{location.host}") |
| 434 | else: |
| 435 | args.append("%s" % location.host) |
| 436 | return args |
| 437 | |
| 438 | def call(self, cmd, args, **kw): |
| 439 | for resp in self.call_many(cmd, [args], **kw): |