scp from Windows Server to Unix server works but not the other way around
I installed OpenSSH on my Windows Server machine to use SSH. To test this out, I ran this command from my windows server.
scp test.txt [email protected]:/path
Which worked, I can see the file on unix via putty. However, if I run this command on the unix server:
scp index.txt [email protected]:/path
It doesn't work. It hangs for a long time and eventually I get:
ssh: connect to host windowserver.company.com port 22: Connection timed out
lost connection
- Make sure your firewall has the configured port open.
- Ensure the server is listening on the configured port. For example, if your server is configured to listen on port 22, run
netstat -ano | findstr ":22"
- Make sure the traffic is allowed on any firewalls between the subnets if applicable.
- Microsoft's documentation is pretty good for OpenSSH. Particularly, check the steps here: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse#start-and-configure-openssh-server