linux - Copying file from ssh server to mac? -


this question has been repeated many times , know copy file ssh server mac should follow this:

copy file "foobar.txt" remote host local host

$ scp your_username@remotehost.edu:foobar.txt /some/local/directory

but want know how can copy local machine after connecting remote ssh. meant after connecting ssh means in terminal connect ssh , copy them pc. want 1 time connect ssh , enter password , operation. why? because writing user friendly program ask password 1 time , don't want user enter every time or save password.

you're trying reuse existing ssh connection.

add ~/.ssh/config set automatical connection sharing:

controlmaster auto controlpath ~/.ssh/control:%h:%p:%r 

now, if do

scp your_username@remotehost.edu:foobar.txt /some/local/directory 

and if have connection established in terminal wont ask password , connection established quickly.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -