homepage Welcome to WebmasterWorld Guest from 54.226.80.196
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
(tip) Easy way to scp files from remote server to laptop
Resolution of: Logged in host ip address?
physics




msg:3078497
 4:00 am on Sep 11, 2006 (gmt 0)

This post is an extension to/resolution of a previous post:
Logged in host ip address? [webmasterworld.com]
I finally got a little function going that will scp a file to your home machine from the remote machine you're interacting with:

function scpme()
{
scp $1 username@${SSH_CLIENT% * *}:./$2
}

This goes in .bashrc and the usage is
scpme foo.txt
or
scpme foo.txt foo-othername.txt

On the same note you can easily set the display with:

alias displayon='export DISPLAY=${SSH_CLIENT% * *}:0.0'

The ${SSH_CLIENT% * *} gets just the IP part from the $SSH_CLIENT variable.

 

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved