LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-27-2020, 10:26 PM   #1
hdg4
LQ Newbie
 
Registered: Jun 2020
Posts: 5

Rep: Reputation: Disabled
Question SCP and SFTP


Hi there,

Unable to find the answer for the below question on internet, so posting on linux forum.

Here i go, suppose PC1 with IP address 192.168.1.1/24 and PC2 192.168.2.1/24. As both the PC are on different network, my question is will PC1 will be able to transfer file using scp to PC2 ? and will PC1 will be able to connect via sftp

Command from PC1 : scp <file needs to be send> <username on pc2>@192.168.2.1:~/

Command from PC1 : sftp <username on pc2>@192.168.2.1



Thanks
hdg4
 
Old 06-28-2020, 07:27 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,808

Rep: Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777Reputation: 2777
This is, at core, not a question about scp or sftp: this is a networking question.

If there is a bridge or router of any kind allowing traffic between the two subnets, then all network protocols (including the ssh suite) should work to the extent they are supported on the two nodes.

I suggest you research your basic IP networking.
 
1 members found this post helpful.
Old 06-28-2020, 08:03 AM   #3
kermitdafrog8
Member
 
Registered: Dec 2018
Location: Orlando, FL
Distribution: Slackware AARCH64 and X86_64
Posts: 340

Rep: Reputation: Disabled
SCP and SFTP

As long as you setup you IP addresses correctly with the right subnet mask both PC's will be under the same 192.168.x.x network. Both going through the same router.
 
1 members found this post helpful.
Old 06-28-2020, 08:10 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Yes.
If both servers agreed on some security protocol and permissions to do so. Typically that would be SSH.
 
1 members found this post helpful.
  


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
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM
LXer: How to: Restrict Users to SCP and SFTP and Block SSH Shell Access with rssh LXer Syndicated Linux News 0 01-02-2008 12:40 PM
LXer: How to: Restrict Users to SCP and SFTP and Block SSH Shell Access with rssh LXer Syndicated Linux News 0 01-02-2008 12:00 PM
LXer: How to: Restrict Users to SCP and SFTP and Block SSH Shell Access with rssh LXer Syndicated Linux News 0 01-02-2008 10:00 AM
SFTP with Chrooting and without SSH and SCP toraghun Linux - Security 1 07-10-2006 05:11 AM

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

All times are GMT -5. The time now is 01:32 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