ssh: connect to host "xxx.xxx.xxx.xxx" port 22: Connection refused

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ssh: connect to host "xxx.xxx.xxx.xxx" port 22: Connection refused

2,660 Views
rohit_maniwal
Contributor II

Hi i am using imx6 board,  i am using GSM module on board and also able to configure ppp after running command "pppd call gprs&" and "route add default dev ppp0" i am able to get ppp0 IP by "ifconfig" and also when i do "ping google.com" from board it works.

also i am able to ping that IP via different networks e.g. imx6(vodafone GSM network) and laptop(via mobile hotspot) but when i try to do ssh root@ip from my laptop it shows

ssh: connect to host "xxx.xxx.xxx.xxx" port 22: Connection refused
i am able to do local ssh connection via Ethernet but when i wanted access my board by a different networks please let me know if i wanted to do some more changes.

Labels (3)
0 Kudos
2 Replies

1,966 Views
b36401
NXP Employee
NXP Employee

If you are able ssh the board with local ethernet and not able with GSM network it seems to be routing or firewall issue.
First please make sure that there is not firewall restrictions configured in the board (iptables -L).
Then please check if ssh service is allowed for all interfaces (however usually it is so).
And then please make sure that the board is avaliable from the outside with IP network.
It is most expected issue.
Please note that this "xxx.xxx.xxx.xxx" address may be internal one and being masqaraded in process of the routing.
I mean that several devices used the same external IP address (not equal to internal one assigned to the interface) and they are not available for incomming connections.
In this case to get ssh working you need to make some tunnel for incomming connections.

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,966 Views
rohit_maniwal
Contributor II

please let me know if i have to do more settings inside sshd_config file and ssh_config file

0 Kudos