Friday, April 26, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 14321  / 2 Years ago, mon, january 24, 2022, 9:12:22

I want to copy a file from my Ubuntu Desktop(user:vverma) to a server named fb3, please guide me regarding how to scp this?



In order to reach fb3, i have to follow these steps:-




  1. ssh to server1 as user1 from my terminal

  2. ssh from server1 to server2 as user1

  3. sudo su - user2

  4. ssh from server2 to server3(which is fb3) as user2



Now please guide me that how can i accomplish this complicated tsak without creating any errors.


More From » 12.04

 Answers
2

I have always did it like this:



rcp filaname usernameinserver@server:path/in/server


The command will ask you for your password on the server (unless you are using another authentication schema).



Note that your user name in the local computer is not relevant.



rcp/scp are tunneled under ssh, it's probably the most secure way to copy a file. If you want increased security you can try to use key pars instead of passwords. It's more complicated to setup but after it's done you don't need to type your password for each transfer.


[#35412] Tuesday, January 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
iriousutur

Total Points: 321
Total Questions: 112
Total Answers: 106

Location: Sweden
Member since Mon, Dec 7, 2020
3 Years ago
iriousutur questions
Sun, Apr 9, 23, 02:48, 1 Year ago
Tue, May 23, 23, 00:41, 1 Year ago
Fri, Oct 21, 22, 02:47, 2 Years ago
Mon, May 9, 22, 00:01, 2 Years ago
;