본문 바로가기
Dev/Linux

[Linux] SSH connectivity Issues

by 흰바다제비 2022. 9. 11.
728x90

Problem statement

: You are not able to ssh login to a server. How will you troubleshoot?

 

What is SSH?

: Netwoking protocol used to access remote server in unique way.

 

Steps for Troubleshooting

1. Try ‘ping’ command

  This is in-general direction for troubleshooting of any network problem.

  @ ping ( $ ping 192.168.3.11)

a. command used to check reachability of host.

   Example $ ping 192.148.3.11

b. It is kind of echo request to send and receive network pockets.

 

2. Permissions for accessing servers

a. Is servers IP correct ? : confirm an IP address you’re using

b. SSH key file : Are you using valid key file?

  i. Is this key injected an server? Read about priviate & public access keys

  ii. file permissions & key file

    use $ chmod to set permissions

    ($ chmod 700 mykey.pem)

    : use $ ls -l to check file permissions

 

3. Check SSH port permissions

Remote server should allow local machines traffic on port 22. Check remote server Networking Rules.

 

4. There is possibility that an organisation is using other than 22 for SSH. Check for permissions/ configurations for that port in that case.

 

5. Is your local machine traffic reaching to remote host?

Ensure the network firewall you’re befind is allowing traffic on Port 22 from your machine.

 

6. Check SSH daemon state.

SSH daemon → A background process helpful in establishing a secure connection to remote host.

Check the state of SSH daemon if it’s in running state

( $ sudo systemctl restart sshd)

NOTE - Any example commands may vary basis operating system

 

 


Reference

 

GitHub - msdeep14/getAheadWithMe: Sharing my experiences to help around.

Sharing my experiences to help around. Contribute to msdeep14/getAheadWithMe development by creating an account on GitHub.

github.com

 

728x90

'Dev > Linux' 카테고리의 다른 글

[Linux] 사용자 UID, 그룹 GID 변경  (0) 2022.10.11
[Linux] Crontab이 작동하지 않을 때  (0) 2022.09.20
[Linux] How to Secure A Server  (0) 2022.09.10
[Linux] Troubleshoot Slow Server  (1) 2022.09.09
[Linux] Kernel  (0) 2022.09.05

댓글