The issue is that Tails' ssh config will try to use Tor to connect to any internet routable address, with exceptions set for private IP ranges.
Since you're referencing the public address, ssh is trying to use Tor to connect but since the destination only accepts connections from other devices on the same network, it cannot establish a Tor connection.
Tails' iptables configuration would also mean that even if ssh wasn't trying to proxy the connection over Tor, a connection to an internet address that wasn't made through Tor would be dropped.
You could setup an onion to provide ssh access over Tor (even a single-hop-onion to improve latency, since the server doesn't need location anonymity) which would allow you to ssh to it from Tails, otherwise you'd need to be able to route to it from a private IP range, specifically one of: 10.0.0.0/8
, 172.16.0.0/12
or 192.168.0.0/16
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
). If it's not, it will try to connect to it over Tor.