LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-02-2012, 07:19 AM   #1
SibBear
LQ Newbie
 
Registered: Jun 2012
Distribution: Debian, Ubuntu, Mageia
Posts: 13

Rep: Reputation: Disabled
Copying file from another machine with scp and smbclient


I have following computers:
1. Home: Linux machine
2. Work: Linux ssh server
3. Work: Windows share

I can log on machine 2 from home:
ssh user@machine2 ;

copy the file from machine 3:
smbclient //machine3/path/to/file "" -c "get myfile"

and get it to my home machine:
^D
scp user@machine2:/home/user/myfile .

Is there the way to get this file using one command or script?

Thank you in advance for your answers.

Last edited by SibBear; 06-02-2012 at 07:21 AM.
 
Old 06-02-2012, 07:52 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
probably this is for you: http://www.ibiblio.org/gferg/ldp/Sam...ith-SSH-3.html
 
1 members found this post helpful.
Old 06-02-2012, 08:10 AM   #3
SibBear
LQ Newbie
 
Registered: Jun 2012
Distribution: Debian, Ubuntu, Mageia
Posts: 13

Original Poster
Rep: Reputation: Disabled
Yes, this is what I need. Thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SCP: Copy file from remote linux server onto a windows machine? Tony Empire Linux - Newbie 21 09-22-2015 10:18 PM
Copying file to different system via crontab-called scp - 'No route to host' EnderX Linux - Networking 3 06-11-2012 07:11 AM
scp truncate text file busy - copying file is not a running binary jetberrocal Linux - Server 3 06-24-2010 03:56 PM
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration