ssh

Circleciを使ってEC2へ自動デプロイ

完成したymlファイル(testは容量がかかるので、コメントアウトにしている) version: 2 jobs: # test: # machine: # image: circleci/classic:edge # steps: # - checkout # - run: # name: docker-compose build # command: docker-compose build # - run: #…

ssh connect port 22: Operation timed outでsshログインができなかったときの対処法

結論 ec2のセキュリティグループでもう一度マイipを選択し直す。 なぜ port22に入るipが変わっている可能性があるから。家には複数のwifiがあり、たまに切り替わる。そこでipが変わってしまったから、ファイアーウォールが入れてくれなかったんだと思う。 っ…

authorized_keys とは?

ssh

今理解していること →pubの内容を保存しておく場所 ~/.ssh/authorized_keys: Holds a list of authorized public keys for servers. When the client connects to a server, the server authenticates the client by checking its signed public key stored …

ssh known_hostsとは

ssh

まとめるとknown_hostsとは「公開鍵認証のSSHでログインしたサーバのホスト鍵を記録し,次回からのホスト認証で利用されるファイル」である. https://a-mochan.hatenablog.com/entry/2019/12/20/141036#:~:text=まとめるとknown_hostsとは,されるファイル」…

ec2内にgit cloneしようとしたら、Cloning into 'myapp'... Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

[kazumawada@ip-10-0-0-197 rails]$ git clone git@github.com:kazumawada/myapp.git Cloning into 'myapp'... Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and th…