sudo scp <file or folder> <name of pc 1>@<IP of pc 2>:

how to scp to another pc on network


0
2012-05-04 17:11:29

These Might Interest You

  • Note, the [remotePort] should be opened in the firewall first. First, start the destination box listening, then fire off the sending box. Data from the /dev/zero device in memory of the source machine is read out using dd, sent over the network with nc, and read back in from the other side of the network with nc, going to the /dev/null device. Essentially, it is a memory-network-memory copy operation, the output of dd will tell you how fast your network really is performing.


    0
    dd if=/dev/zero bs=256M count=1 | nc [remoteIP] [remotePort] and on the other host nc -l port >/dev/null
    tkunz · 2009-07-14 20:30:52 1
  • This command will display only the hosts that are active in the network. Show Sample Output


    0
    nmap -sP your network/submask | awk "/^Host/"'{ print $2 }'
    rauhmaru · 2009-04-02 12:41:54 3
  • a simple command in order to make iptables rules permanent, run @ sudo!


    0
    iptables-save > firewall.conf; rm -f /etc/network/if-up.d/iptables; echo '#!/bin/sh' > /etc/network/if-up.d/iptables; echo "iptables-restore < firewall.conf" >> /etc/network/if-up.d/iptables; chmod +x /etc/network/if-up.d/iptables
    dddddsadasdasd · 2010-11-13 23:58:28 1
  • If you need to ssh into a computer on the local network but you're unsure of the ip to use, then ping them and see if you get a response. If you do, print out the address you got it from. Adjust the range to suit your network.


    -2
    for i in 192.168.1.{61..71};do ping -c 1 $i &> /dev/null && echo $i;fi;done
    AlecSchueler · 2009-08-26 06:04:24 8
  • Depending on the network setup, you may not get the hostname. Show Sample Output


    4
    nmap 192.168.0-1.0-255 -sP
    clockworkavian · 2009-03-23 22:19:05 4
  • Get all the networking related commands for your distro Show Sample Output


    12
    apropos network |more
    shaiss · 2009-09-25 15:05:33 1

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: