Skip to content

Tag: amazon-web-services

Not able to connect to AWS server using linux terminal after a reboot with “sudo service sshd restart”. Getting “Connection timed out” error

I was trying to edit the sshd_config file and in between that my machine crashed. When I tried again it started showing the below message- I deleted the .swp file but it looks like the original file got deleted. After that I ran this command “sudo service sshd restart “. Now I am not able to conne…

Iterate through commands and execute in bash

I wrote a script that transfers a new key to my AWS instances. The script executes with no errors, but when I check the ~/.ssh/authorized_keys file on the instance, I do not see the new SSH key. Here is the script: It does print out “Key copied” I have changed the ip addresses of the servers. If I…