Remote SSH connection from one server to another HANGS, no fail, no error

in flag

Trying to copy files from one server to another because the amount of files is not feasible to do by copying to my home pc and then out to second server.

SSH, rync, and scp all hang from either server, but works fine to log in directly over SSH either from web terminal or from putty over SSH.

  • I whitelisted IP of server 1 to CSF on server 2.
  • I whitelisted IP of server 2 to CSF on server 1.
  • I completely turned off CSF on both servers to see if it was blocked by the firewall.

I added this into sshd_config:

PermitRootLogin yes
AllowUsers root otheruser 

I verified the port on both servers using this:

# netstat -plant | grep :22
tcp        0      0    *               LISTEN      101059/sshd
tcp        0      0 <server.2.ip>:22         <myhomeip.via.web.terminal>:61177     ESTABLISHED 102710/sshd: root@p
tcp6       0      0 :::22                   :::*                    LISTEN      101059/sshd

Example output:

every one of these commands outputs those 4 lines of code (starting with OpenSSH_7.4p1) and hangs (nothing else happens, it doesn't terminate and no error):

From server 2:

# ssh -A -t -v [email protected] -p 22     
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to [<server2.ip>] port 22


ssh -A -t -v [email protected] -p 22 scp /testnew /testfolder


ssh -A -t -v [email protected] -p 22 /testnew /testfolder


ssh -A -t -v [email protected] -p 22 scp /testfolder [email protected] -p 22 /testnew


rsync -a -e "ssh -p 22" [email protected]:/testfolder /testnew


From server 1:

ssh -A -t -v -p 22 scp /testnew /testfolder


ssh -A -t -v -p 22 /testnew /testfolder


ssh -A -t -v -p 22 scp /testfolder [email protected] -p 22 /testnew


rsync -r -v --progress -e "ssh -p 22" [email protected]:/testfolder /testnew


I also tried using a private key by generating a key on one server and uploading it to the other server, and then trying to access the other with SSH, but again, just hangs!

ssh -i ~/.ssh/id_dsa [email protected] -p 22

nothing! no result at all, only hangs.

What am I doing wrong??

I installed cygwin on my PC and I was able to ssh into both servers just fine. I only can't connect from one server to the other and back. I tried using the web terminal, I tried using putty, all just hangs, nothing. I tried resetting my home connection, I tried everything. Nothing. I'm at a loss and I don't know what else to try.

What am I doing wrong? Why can I access just fine from cygwin on my home pc, and I can access both directly over putty using SSH, but I cannot connect from one server to the other?


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.