jenkins - can't ssh to remote server (key - permission denied) but works from cli

前端 未结 5 1234
孤独总比滥情好
孤独总比滥情好 2021-01-06 12:40

I have Jenkins running on my local machine trying to figure out remote ssh problem I\'m having on a server. I\'m getting this permission denied error which indicates a probl

5条回答
  •  心在旅途
    2021-01-06 13:19

    Jenkins run shell scripts is slight different with cmd line on environment

    there are some environment difference in your case, which we didn't notice. like initial script, path setting.

    besides the method provided by @coffeebreaks, try below

    • check the system environment, like show command env
    • write above steps into bash scripts and run the scripts both in cmd line and jenkins jobs
    • use another user instead of your initial user who starts jenkins instance

提交回复
热议问题