Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On my own I've managed to set up SSH on my home router and login from a remote location, and from there SSH into my personal computer, but now what I can't figure out is how to transfer files from my home PC to the remote location and vice versa via scp. Is there a way to specify a PC behind my router? ie. root@my.router.ip.address/username@192.138.1.101? (I know that syntax wouldn't be correct) It seems like this would be fairly simple, but I'm not sure what to look for next. Is this what port forwarding is for?
did you try sftp for file transfer purpose? and ssh forwarding?
you can forward a port on your pc behind router to local one, and connect with sftp to it like it's on your current PC.
You need to know the public IP of your network(PC behind the router). For your home PC you can visit www.whatismyip.com (either in lynx or GUI browser(firefox/IE/etc)
Right, I've gotten that far, but the problem is that in order to get to my PC I have to go through my router. So there's really three IPs involved here. So basically, from a remote location, what is the path to my PC (which is behind my router)?
Ahh... I misread that. I just have port 22 open on my router for my PC. Then when I scp/ssh into my public IP it goes straight to my Linux PC. Not sure how to do what you're trying.
Well, I've set up my router to forward port 22 to my IP (or so it seems), but when I ssh into my external IP I still ssh into my router... Shouldn't my router be passing the ssh request straight to my computer instead of handling it itself? (see attachment)
(I've set SSH to use port 2020 on my machine, in case you're wondering.)
Aha! I found out what was wrong. I correctly configured port forwarding; HOWEVER, I had SSH Management enabled. I disabled this (Administration > Management > SSH Management) and all seems to be working fine now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.