Jenkins transferring file using publish over SSH plugin but file not show in remote development server I have a running a jenkins job by jenkins pipeline. i wants to send an environmental (.env) file from my local system to my server using Publish Over SSH Plugin.

Here is my jenkins snippet:

stage('Pull In Development') {
        when { branch 'development' }
        steps {
            script {
                sshPublisher(publishers: [
                    sshPublisherDesc(configName: 'developmment-server',
                        transfers: [
                            sshTransfer(
                                cleanRemote: false,
                                excludes: '',
                                execCommand: '',
                                execTimeout: 120000,
                                flatten: false,
                                makeEmptyDirs: false,
                                noDefaultExcludes: false,
                                patternSeparator: '[, ]+',
                                remoteDirectory: '/var/www/sockets',
                                remoteDirectorySDF: false,
                                removePrefix: '',
                                sourceFiles: '**/*.env'
                            )
                        ],
                        usePromotionTimestamp: false,
                        useWorkspaceInPromotion: false,
                        verbose: false
                    )]
                )
            }
        }
    }


Then after transferring, it shows 1 file transferred.

SSH: Connecting from host [pasha-pc]
SSH: Connecting with configuration [stage-server-v1] ...
SSH: Disconnecting configuration [stage-server-v1] ...
SSH: Transferred 1 file(s)


But when i enter the server and go to /var/www/sockets no .env file here. SO am i make any mistake on ssh code.

NB: .env on git ignored file
Please try with double // before var in remoteDirectory: '/var/www/sockets'.