Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-21599

SSH task not compatible with ssh/config file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Tracked Elsewhere
    • Low
    • None
    • 8.1.2
    • SCP and SSH tasks
    • None

    Description

      Issue Summary

      When setting AcceptEnv in ~/.ssh/config, Bamboo doesn't apply the settings there. This happens because Bamboo doesn't call the OS native SSH client, but uses a built-in plugin

      Steps to Reproduce

      1. Create a file in the users profile:
        touch ~/.ssh/config
        chmod 600 config
        
      1. Set a rule, like for example:
        Host *
           SendEnv bamboo*
        
      1. In the remote server, set /etc/ssh/sshd_config to accept those variables:
        ...
        # Allow client to pass locale environment variables
        AcceptEnv bamboo*
        AcceptEnv LANG LC_*
        ...
        
      1. In a build, set a variable:
        var = value1
        
      1. Create a SSH task and use the variable:
        echo ${bamboo_var}
        

      Expected Results

      Value is printed

      Actual Results

      Value is not printed. This is also reproducible by defining the variable on a script task:

      export bamboo1=value1
      

      Similar tests run from command line (same computer + OS user) work normally (those same variables can be echoed).

      Workaround

      Use a script task instead.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pdemitrio Patricio
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: