Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
luutruong opened this issue · comments
Truong Luu commented
YML setup:
name: Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Executing remote command
uses: fifsky/ssh-action@master
with:
host: ${{ secrets.HOST }}
user: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.PORT }}
args: "-tt -vvv"
command: "cd ${{ secrets.DEPLOY_PATH }} && bash scripts/ci-deploy.sh"
Xudong Cai commented
Check your server sshd configuration
vi /etc/ssh/sshd_config
PubkeyAuthentication yes
Truong Luu commented
I did set that config but still have issue.
Xudong Cai commented
https://phoenixnap.com/kb/ssh-permission-denied-publickey
https://stackoverflow.com/questions/36300446/ssh-permission-denied-publickey-gssapi-with-mic
Maybe it can help you
Special attention should be paid to the SSH config file and key file permissions, Setting 700 to .ssh and 600 to authorized_keys solved the issue.
Truong Luu commented
@fifsky I have tried all above methods before create this issue. Btw i created ssh key in local and push it to server and work fine but when using key from server it's does not.