Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Copying files from server to another server


    I'm trying to copy files from my current server to a new server. Both servers have SSH installed.

    These are the commands I'm using. However I'm getting connection refused. I did a google search and found out that maybe the reason of this error could be due to the fact that my current server doesn't have SSH. However I use SSH often on my current server so I can say that it has SSH for sure.

    OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug1: Connecting to IP_OF_CURSERVER [IP_OF_CURSERVER] port 22.
    debug1: connect to address IP_OF_CURSERVER port 22: Connection refused
    ssh: connect to host IP_OF_CURSERVER port 22: Connection refused

    Anyone knows what I need to do to solve this problem?


  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    West Yorks
    Hi and welcome to the forums.

    Are the firewalls on both machines configured to allow ssh connections?

  3. #3
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Boston, MA
    Have you opened up sshd in your /etc/hosts.allow file?

    Basic usage*

    # let everyone connect to you
    sshd: ALL
    # OR you can restrict it to a certain ip
    # OR restrict for an IP range
    # OR restrict for an IP match
    sshd: 192.168.1.
    *From Arch Wiki

  4. $spacer_open
  5. #4
    Thanks for your help.

    I found out the problem.

    The server I wanted to copy the files from has a different port number and I had to specify that port number with -P

    It works perfect now

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts