Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 2
    What's wrong with: scp file1 file2 file3 file4 file5 file6 file7 file8 file9 file10 username@computername:/path/to/directory Commented Oct 23, 2015 at 19:53
  • There is no way to "store" the password or the first authentication to use from one command to the next, but you can use ssh keys like Thorian suggests. If you're using spawn with expect, then the ssh key solution is the only safe way. Commented Oct 23, 2015 at 20:07
  • 1
    Why not create an archive and send the archive ( jar, tar.{gz,bz2,xz}, zip) to the other machine? Commented Oct 23, 2015 at 20:12
  • What @garethTheRed suggested is what I'd do. Commented Oct 23, 2015 at 21:01