You are not logged in.
What I am trying to do is to transfer files in between PC A to PC B via SSH or SFTP protocol using ethernet. PC B already has SSH setup and running via internet connection with WLAN. But, I would like to have another connection via ethernet. Is it possible to add another IP with different subnet mask in order to achieve this? Or is there another way of doing this?
Thanks.
Last edited by redshoe (2024-06-16 16:09:01)
Offline
By default OpenSSH (and probably other servers) listens on all local addresses. It shouldn't be a problem to have multiple SSH connections via different interfaces.
What specific problem did you encounter?
What happens when you try to transfer files using ethernet interface address?
Are PC A and PC B in the same WLAN? Are they connected directly with ethernet cable?
Offline
Assuming there's an actual problem and this isn't just anticipatory: can you ping via the ethernet?
Offline
As this is a follow up to https://bbs.archlinux.org/viewtopic.php?id=296785 - Have you followed the information you were given: Properly set up the ethernet NICs on thier own subnet different from the wifi?
If so it should work out of the box without any further config required.
PC A
wifi: 192.168.1.100/24
ethernet: 192.168.2.1/24
PC B
wifi: 192.168.1.101/24
ethernet: 192.168.2.2/24
You should be able to connect via both wifi and ethernet by specifying the ip of the connection you want to use.
Hint: assign the same subnet to both wifi and ethernet might work but lijely cause issues.
Offline
Yeah. I just set the network (via ethernet) with different subnet than the WLAN, and it worked right off the bat. For some reason, I thought there should be some kind of special treatment for sshd_config in order for this to work. Thank you for your help.
Offline
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
Yeah. I just set the network (via ethernet) with different subnet than the WLAN, and it worked right off the bat. For some reason, I thought there should be some kind of special treatment for sshd_config in order for this to work. Thank you for your help.
As pointed out by dimich: unless a service is bound to only a specific interface a normal server socket usually lustens on every incomming connection.
So usually care must be taken if one wants a service to only be bound to a specific interface.
Offline