I wondering what I need to do when I connect to ssh from another network, for example if I have IP 10.10.10.1 and if I try to connect from 192.168.1.15 or 22.214.171.124. Beside the ssh config, do I need to setup a access-list do you have to be in the same network?
To supplement the information provided by @GRANT3779 what is required is basic IP connectivity between the device originating the request for SSH and the device that is the destination of the SSH request. The requestor must have a working path to the destination and the destination must have a working path to the requestor. It does not matter whether it is based on static routing, dynamic routing, or a mix of both. It only matters that IP packets successfully go between them.
It also assumes that SSH has been successfully implemented on the destination device. And it assumes that if security policies have been implemented on the destination to control SSH access that the destination device is permitted SSH access.