Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, 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. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    2

    Copying files from server to another server


    Hi,

    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?

    Thanks!

  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,393
    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
    Location
    Boston, MA
    Posts
    4,651
    Have you opened up sshd in your /etc/hosts.allow file?

    Basic usage*

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

  4. #4
    Just Joined!
    Join Date
    Oct 2009
    Posts
    2
    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
  •