LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-12-2016, 09:05 PM   #1
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Rep: Reputation: Disabled
How to file transfer or copy file while in SSH?


Without login via SSH to remote host,
we can securely copy or transfer using scp command.

Consider this case:
After we login with SSH to remote host, what utility can we
use to securely copy from remote host to my laptop
(while still inside SSH)?

Addendum:
I am going to try scp while in SSH mode....
Answer:
Nope. it does not work because while already in remote host I cannot access my laptop. The laptop is not accessible from WWW since it has a local private IP.

Last edited by fanoflq; 11-12-2016 at 09:28 PM.
 
Old 11-12-2016, 09:51 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 18,768
Blog Entries: 28

Rep: Reputation: 5968Reputation: 5968Reputation: 5968Reputation: 5968Reputation: 5968Reputation: 5968Reputation: 5968Reputation: 5968Reputation: 5968Reputation: 5968Reputation: 5968
For all practical purposes, scp is ssh for files.

I know of no way to copy a file over ssh when you are logged into another computer via ssh. That's why scp exists.

Last edited by frankbell; 11-12-2016 at 09:53 PM.
 
Old 11-13-2016, 12:47 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 6,900
Blog Entries: 3

Rep: Reputation: 3584Reputation: 3584Reputation: 3584Reputation: 3584Reputation: 3584Reputation: 3584Reputation: 3584Reputation: 3584Reputation: 3584Reputation: 3584Reputation: 3584
You can't go backwards to the client machine unless it also has an SSH server running and is accessible. Better to open another terminal window in your GUI and do "sftp" or "scp" there, leaving the original remote session open.

If your client only has a single console and no options for any more, then you could suspend "ssh"
with ~^Z and with "ssh" in the background, run "scp" However, most GNU/Linux systems have multiple consoles you can get to with ctrl-alt-f1, ctrl-alt-f2, and so one up to f6. Or you can run "tmux" in your console.

But, again, if you have a graphical session running just open another terminal window.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
file time stamp is wrong with ssh file transfer cy163 Linux - Newbie 8 05-18-2008 01:40 AM
file transfer over ssh? jme Linux - Software 5 11-13-2006 01:30 AM
SSH File transfer wjeanpaul Linux - General 19 02-07-2006 02:34 PM
File transfer with SSH? Baix Linux - Newbie 5 01-28-2005 06:24 PM
ssh file transfer? Apostasy Linux - Newbie 11 07-30-2004 10:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration