Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: scp not working

  1. #1
    Join Date
    Dec 2012
    Beans
    14

    scp not working

    I have connected to a Ubuntu 12.04 server via ssh from a laptop running Ubuntu 12.04. So far so good, on the server I tried to send a file back to the laptop using scp
    Code:
    user@host$ scp file1 user@ip-address:Desktop/ 
    
    ssh: connect to host <ip-address> port 22: Connection timed out 
    lost connection
    From the server I tried to see if port 22 was open on the laptop using netcat
    Code:
    user@host$ nc -zv <ip-address> 22 
    
    nc: connect to <ip-address> port 22 (tcp) failed: Connection timed out
    Any help or suggestions would be appreciated, thanks

  2. #2
    Join Date
    Nov 2007
    Location
    Newry, Northern Ireland
    Beans
    1,258

    Re: scp not working

    Do you have SSH server running on the laptop, or just a SSH client?
    Can't think of anything profound or witty.
    My Blog: http://gonzothegeek.blogspot.co.uk/

  3. #3
    Join Date
    Dec 2012
    Beans
    14

    scp not working

    I have connected to a Ubuntu 12.04 server via ssh from a laptop running Ubuntu 12.04. So far so good, on the server I tried to send a file back to the laptop using scp
    Code:
    user@host$ scp file1 user@ip-address:Desktop/ 
    
    ssh: connect to host <ip-address> port 22: Connection timed out 
    lost connection
    From the server I tried to see if port 22 was open on the laptop using netcat
    Code:
    user@host$ nc -zv <ip-address> 22 
    
    nc: connect to <ip-address> port 22 (tcp) failed: Connection timed out
    Any help or suggestions would be appreciated, thanks

  4. #4
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,499
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: scp not working

    does scp user@server:/dir/file1 Desktop/ executed on your laptop work?
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

  5. #5
    Join Date
    Dec 2012
    Beans
    14

    Re: scp not working

    I just tried scp file1 user@server from the laptop and it worked.

    To scp from server back to the laptop does ssh-server have to be installed on laptop?

  6. #6
    Join Date
    Dec 2012
    Beans
    14

    Re: scp not working

    just the client, do i need to install ssh server?

  7. #7
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: scp not working

    Quote Originally Posted by schnimmy View Post
    I just tried scp file1 user@server from the laptop and it worked.

    To scp from server back to the laptop does ssh-server have to be installed on laptop?
    yes - you need the sshd
    sudo apt-get install openssh-server
    Last edited by rnerwein; December 8th, 2012 at 09:27 PM.
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  8. #8
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: scp not working

    Threads merged. Please do not start multiple threads for the same support request, it dilutes the community's ability to help.
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  9. #9
    Join Date
    Dec 2012
    Beans
    14

    Re: scp not working

    okay thanks, I've installed the ssh server on the laptop, still can't seem to ssh from server to laptop. Do any directives in /etc/ssh/sshd_config need altering? I've tried changing PermitRootLogin to yes and ChallengeResponseAuthentication to yes and PasswordAuthentication to yes, makes no difference.

    Suggestions please

  10. #10
    Join Date
    Dec 2012
    Beans
    14

    Re: scp not working

    the ssh server on the laptop is listening on port 22, the command netstat -an | grep LISTEN shows that it is
    Last edited by schnimmy; December 8th, 2012 at 10:50 PM.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

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