title: scp to a remote server; ssh: connect to host server@address.it port 22: Connection timed out
body: <p>I'm having some trouble to use scp command in order to copy some file in a remote server.</p>
  
  <p>the line i write on the terminal is </p>
  
  <pre><code>scp file.dat server@address.it:home/folder
  </code></pre>
  
  <p>and after about a minute it says the connection is lost due to time out</p>
  
  <p>using the option <code>-vvv</code> I get</p>
  
  <pre><code>Executing: program /usr/bin/ssh host server@address.it, user username, command scp -v -t home/folder
  OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
  debug1: Reading configuration data /etc/ssh/ssh_config
  debug1: /etc/ssh/ssh_config line 19: Applying options for *
  debug2: resolving "server@address.it" port 22
  debug2: ssh_connect_direct: needpriv 0
  debug1: Connecting to server@address.it [141.108.1.185] port 22.
  debug1: connect to address 141.108.1.185 port 22: Connection timed out
  ssh: connect to host server@address.it port 22: Connection timed out
  lost connection
  </code></pre>
  
  <p>Seaching on the web, I found that the most common source for this problem are firewalls, but I checked them and it seems they are ok. Indeed I have</p>
  
  <pre><code>sudo ufw status
  Stato: attivo
  
  A                          Azione      Da
  -                          ------      --
  22/tcp                     ALLOW       Anywhere                  
  22                         ALLOW       Anywhere                  
  22/tcp (v6)                ALLOW       Anywhere (v6)             
  22 (v6)                    ALLOW       Anywhere (v6)             
  </code></pre>
  
  <p>One last information, if I try to make the access to the remote server from my PC terminal using ssh, there are no problems, and there I have done simple operations like creating folders (not much more for now, since I have to copy some data from my PC to that server to work on it)</p>