Advertisement
zashkurka

ssh issue

Jul 28th, 2023
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. Hi! I'm trying to run a command like `ssh my_server "cd /deploy/app && git pull origin master"` as part of the process for deploying new versions of my web application. Here's what I've set up so far: 1. SSH into the server is properly setup. 2. ssh-agent forwards my ssh key I set up with github to server. Running `ssh-add -L` on the server lists the local key I want forwarded. Here's the error message: `ssh my_server "cd /deploy/app && git -T git@github.com"` errors with "Host key verification failed." Here's what I think the problem is: When I SSH into the server, `cd /deploy/app` and then `ssh -T git@github.com` the ssh process says the authenticity of the host can't be verified, asks me to verify I want to try connecting, and, when I type yes, the command succeeds but ssh fails to add the host to the list of known hosts. I have confirmed that the user I am sshing with owns the proper .ssh directory, but I also see that no known_hosts file exists. I think is probably why host verification fails when I run the ssh commands from my local machine. I'm hoping someone can advise me on how I can overcome this absence of the known_hosts file. I'm running Centos Stream 9.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement