SSH task not compatible with ssh/config file

XMLWordPrintable

    • Type: Bug
    • Resolution: Tracked Elsewhere
    • Priority: Low
    • None
    • Affects Version/s: 8.1.2
    • Component/s: SCP and SSH tasks
    • None
    • 1
    • Severity 3 - Minor

      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.

            Assignee:
            Unassigned
            Reporter:
            Patricio (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: