Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I usually do this:

scp something user@ip

But, that's because my other server has an IP.

What is the IP of my laptop? (What if I am behind a wireless router?) How do I scp into my laptop?

share|improve this question

migrated from Dec 2 '09 at 18:04

This question came from our site for system and network administrators.

sounds like a superuser question – warren Nov 30 '09 at 13:52
Now I can't stop singing "My bratwurst has a first name, it's F-R-I-T-Z..." – womble Nov 30 '09 at 21:00
up vote 8 down vote accepted

Your wireless router creates a private network for your laptop and all your other wireless devices to share a single IP address. The IP your ISP gives you might change from time to time but for the most part it doesn't change too much.

When your router gets a request from the internet to port 22, it blocks it because the router doesn't know what computer to send the request to. But if you tell it to, it can forward the port to a specific computer, i.e. your laptop.

So you can usually access your routers settings by pointing your browser to (or 1.1) and look for a section with the words port forwarding in it. Tell it to forward port 22 to your laptop's ip address. (You can get the address via ifconfig).

Use a website like to find out the public-facing address that the ISP gives you and then use the public IP address to connect to your laptop via SSH.

If you only want a temporary connection you can use your web server to bounce connections to your local computer by using openssh like this:

ssh server-user@server-ip -R2222:localhost:22

As long as that connection (from your laptop to your server) is open, then you can connect to your laptop with:

ssh laptop-user@server-ip -p 2222
share|improve this answer

The wireless router you are behind is likely performing Network Address Translation. That means that your laptop is a non-routable, internal IP like You can see this by running ifconfig on your laptop, assuming you're running Linux as indicated by your tags.

Your router has both an internal IP, on the NAT network, and an external IP visible by the greater Internet. In order to connect using ssh to your laptop on port 22 from the Internet, you'll need to set up your router to forward traffic to port 22 to your laptop's internal IP. That can be done by using the web interface for your router's settings, typically by opening your browser to something like,, etc, depending on your internal network settings. Then, you would simply connect to your router's external IP using ssh/scp from an outside machine, and the traffic would be forwarded to your laptop.

share|improve this answer

To find out the ip of your laptop, launch ifconfig from a terminal application (technically it's a command you're supposed to type at a shell command prompt). To find out what IP you have online,

  • if you're behind a NAT/Router, you could check your router status/configuration
  • you could try this link

This, however, does not guarantee that you can do scp from a remote site into your laptop. As a matter of fact,

  • your laptop must have a ssh server listening, and
  • the TCP port where the ssh server is listening (usually port 22) should be accessible from outside; this means, that if you're behind a nat/router you need to configure the router to redirect (or "forward") that port to your laptop's IP address.

Things might be more complicated than that. Next time please state clearly what your OS is, what you need to do, provide examples, and if possible detail which steps you did and why it wasn't working.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.