• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 339
  • Last Modified:

How to upload file with FTP to another Linux server through SSH

Hi Everyone,

I have two Linux servers. I want to upload a file from one of my Linux server to second one using FTP protocol through SSH.

How can i do this?

I don't want to download it from the first server and then upload it to second server.

Please help, thank.

p.s.: Urgent
0
blacklord
Asked:
blacklord
  • 2
  • 2
1 Solution
 
edkim80Commented:
use scp

login to one server1 via ssh then do..

scp filename username@server2:/path/to/directory
0
 
blacklordAuthor Commented:
Thanks for quick answer but when i try this it gives "lost connection" error.

What can be the reason?
0
 
edkim80Commented:
are you able to connect to both machines through ssh?
0
 
blacklordAuthor Commented:
ahh, got it. I was trying to connect with incorrect user.

Thanks, you got the points!

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now