I'm trying to connect my Ubuntu host to a fedora laptop via ssh in order to share files over Ethernet. I have OpenSSH server started on fedora (via service sshd start
) and I already executed the command iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
in order to allow incoming ssh connections. Moreover the IPv4 address on the server is set by ifconfig enp2s0f0 192.168.10.10 netmask 255.255.255.0 up
. But whenever I type ssh -A -Y 192.168.10.10
or ssh -4 192.168.10.10
; I get always an error message showing "ssh: connect to host 192.168.10.10 port 22: Connection refused", even after having the firewall disabled using service iptables stop
.
iptables -n -L -v
output on fedora shows:
Chain INPUT (policy ACCEPT 11652 packets, 2859K bytes) pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 11759 packets, 1665K bytes) pkts bytes target prot opt in out source destination
iptables -n -L -v
output on ubuntu shows:
Chain INPUT (policy ACCEPT 210K packets, 16M bytes) pkts bytes target prot opt source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt source destination
Chain OUTPUT (policy ACCEPT 209K packets, 15M bytes) pkts bytes target prot opt source destination
Executing route -n
within the server, gives the following output:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0f0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
executing sudo route -n
within the Ubuntu client machine, gives the following output:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.10.1 0.0.0.0 UG 100 0 0 enp14s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enp14s0
192.168.10.0 0.0.0.0 255.255.255.0 U 100 0 0 enp14s0
ip r
on client machine:
default via 192.168.10.1 dev enp14s0 proto static metric 100
169.254.0.0/16 dev enp14s0 scope link metric 1000
192.168.10.0/24 dev enp14s0 proto kernel scope link src 192.168.10.10 metric 100
arping -I enp14s0 192.168.10.10
on client machine, got stuck at:
ARPING 192.168.10.10 from 192.168.10.10 enp14s0
output of sudo tcpdump -n -i any port 22
:
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
01:09:28.363302 IP 192.168.10.10.58906 > 192.168.10.10.22: Flags [S], seq 506055200, win 43690, options [mss 65495,sackOK,TS val 33913 ecr 0,nop,wscale 7], length 0
01:09:28.363357 IP 192.168.10.10.58906 > 192.168.10.10.22: Flags [R.], seq 0, ack 506055201, win 0, length 0
01:09:28.354895 IP 192.168.10.10.58906 > 192.168.10.10.22: Flags [S], seq 2349767060, win 43690, options [mss 65495,sackOK,TS val 34911 ecr 0,nop,wscale 7], length 0
01:09:28.354948 IP 192.168.10.10.22 > 192.168.10.10.58908: Flags [R.], seq 0, ack 2349767061, win 0, length 0
Does anyone have any idea?
Your help will be much appreciated.