class_docstr: Representation of an SSH connection.
      
class_docstr_tok: ["Representation","of","an","SSH","connection","."]
docstr: Internal helper for SCP interface methods
code: def _get_scp_command_spec(self, recursive, preserve_attrs):
      """Internal helper for SCP interface methods"""
      # Convert ssh's port flag (-p) to scp's (-P).
      scp_options = ["-P" if x == "-p" else x for x in self._ssh_args]
      # add recursive, preserve_attributes flag if recursive, preserve_attrs set and create scp command
      scp_options += ["-r"] if recursive else []
      scp_options += ["-p"] if preserve_attrs else []
      return ["scp"] + scp_options
  
imports: import fasteners
  import os
  import logging
  from socket import gethostname
  from hashlib import md5
  from subprocess import Popen
  import tempfile
  import threading
  from datalad.utils import quote_cmdlinearg
  from datalad.support.exceptions import CapturedException, CommandError, ConnectionOpenFailedError
  from datalad.support.external_versions import external_versions
  from datalad.utils import auto_repr, Path, ensure_list, on_windows
  from datalad.cmd import NoCapture, StdOutErrCapture, WitlessRunner
  from ..None import cfg
label_desc: Use image node_id 10 for calling the BaseSSHConnection obj's underlying member method code with example usage: obj._get_scp_command_spec(recursive, preserve_attrs) and returns: unknown