code: def ssh(lancet, print_cmd, environment):
      
      namespace = {}
  
      with open(lancet.config.get('dploi', 'deployment_spec')) as fh:
          code = compile(fh.read(), 'deployment.py', 'exec')
          exec(code, {}, namespace)
  
      config = namespace['settings'][environment]
      host = '{}@{}'.format(config['user'], config['hosts'][0])
      cmd = ['ssh', '-p', str(config.get('port', 22)), host]
  
      if print_cmd:
          click.echo(' '.join(quote(s) for s in cmd))
      else:
          lancet.defer_to_shell(*cmd)
docs: SSH into the given environment, based on the dploi configuration.