LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-16-2009, 12:33 AM   #1
mafiltenborg
Member
 
Registered: Jan 2004
Location: Denmark
Distribution: Debian, Debian, Debian
Posts: 81
Blog Entries: 3

Rep: Reputation: 19
File/directory transport over ssh - how?


Got myself a Debian box (an NSLU2...) running a ssh server and a 160 GB disk w. data i'd like to access when i'm away from home.

Can ssh into the box from another (Debian) box. Can also scp single named files from the shell. Nice, but i'd like to do better than that. Accessing the server from e.g. one of the window-panes in mc or Krusader - or the Windows(TM) TotalCommander(R) - would be desirable.

I'd like to do this securely - meaning via the installed ssh. Several people have talked about 'tunneling' over ssh, and this sounds like a viable solution, but i'm not sure how to proceed. Read the ssh manpage, but that only made me confused on a higher level

Attaching this remote host via mount or creating a driveletter on the occasional windows-box would be perfect. I've got a vague idea that it's possible via mount/fstab, but cannot figure out how. Regarding windows i'm all blank.

Anyone?
 
Old 02-16-2009, 12:43 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Perhaps another solution might be to have GUI access to your system, via VNC or tunnel X windows over SSH:

http://www.howtoforge.com/configure-...ubuntu-desktop
http://news.metaparadigma.de/?p=237
http://suso.org/docs/shell/ssh.sdf
 
Old 02-16-2009, 01:59 AM   #3
mafiltenborg
Member
 
Registered: Jan 2004
Location: Denmark
Distribution: Debian, Debian, Debian
Posts: 81

Original Poster
Blog Entries: 3

Rep: Reputation: 19
Tempting.

The NSLU2 packs a 266 MHz intel CPU, a whopping 32 MB of RAM and beforementioned 160 GB harddrive. Getting it to run Debian - even a skinned-down version - in the first place is a challenge in itself. A fun challenge! Thought about installing X, but why? The machine has no graphics interface and running ANYTHING X-like on 32 MB of RAM is not going to work very well. Tried running X on an old ThinkPad 701 (BlackBox WM if memory serves me right). Not funny! Been there, tried that, got the T-shirt

Second; getting GUI access on a remote machine brings me nothing. AFAIK it's like telnetting in, only prettier. I still need to get files across, not just graphics. Yes, i believe VNC does some file-transporting-thing via D&D, but running RDC/VNC on top of X is not an option.

Actually, i've just cracked the nut myself. Here's how:

Start mc.
In either 'Left' or 'Right' menu, choose 'Shell link'.
Enter remote host id.
Answer the password prompt.

Done - you're in.

I'm not entirely sure what happens here, but for sure it's not telnet. Neither is it FTP. And the password was my ssh-password, sooo...

Hmmmm... Perhaps mc does the scp-danceroutine behind the scene?

I don't know, but once again the Linux/opensource phenomenon amazes me. In this case mc, which again and again has proved to be a real swiss-army-knife for filesystem handling.

Everything in this L-world seems to be bursting with more-or-less-hard-to-handle functionality. If i move towards bare-metal-handling using shell tools, i get immense, but fully manual powers. If i decide to go lazy, i find tools providing automatics, but also requiring knowledge to work correctly. Fine with me.

If i don't know how, i read up on the subject for a while. If that doesn't work, i ask you guys

Usually i end up knowing more.

Thanks!
 
Old 02-16-2009, 02:58 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
If you use konqueror, you can use the fish:/ protocol in one pane and a local directory in the other pane. This will allow you to manipulate files as if they were in a local directory.

You can also use the sshfs filesystem to mount a remote directory locally and then use any cli command or gui program to copy or move files.
 
Old 02-16-2009, 04:32 AM   #5
mafiltenborg
Member
 
Registered: Jan 2004
Location: Denmark
Distribution: Debian, Debian, Debian
Posts: 81

Original Poster
Blog Entries: 3

Rep: Reputation: 19
Thumbs up

Quote:
Originally Posted by jschiwal View Post
If you use konqueror, you can use the fish:/ protocol in one pane and a local directory in the other pane. This will allow you to manipulate files as if they were in a local directory.

You can also use the sshfs filesystem to mount a remote directory locally and then use any cli command or gui program to copy or move files.
Awesome

Actually... I use KDE, and vaguely remembering 'something' about associations, kioslave blablabla and general uniform access-methods, i didn't even try out the fish-protocol with Konqueror. I did it with Krusader, an mc-like filemanager for KDE.

And it worked - out of the box. First time!

Thanks a bundle

sshfs??? Aargh - why didn't i think of that! Will examine...


Next - how do i do this on a Windows(TM)-box? This is equally important, as i plan to store my Windows(TM)-managenent/repair-tools on this tiny server, and thus (obviously) will need access to them from beforementioned Windows(TM)-boxes. You know; visiting friends, somebody complains about having problem Z with application X on their Windows(TM)-box - and of course i've forgotten my pendrive just that particular day...
 
Old 02-16-2009, 05:22 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,157

Rep: Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340Reputation: 3340
putty - would have to have scp and/or sftp (guessing, haven't tried).
 
Old 02-16-2009, 05:30 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 404Reputation: 404Reputation: 404Reputation: 404Reputation: 404
People already told you about konqueror, fish and sshfs, they will all work ok. So I'll comment another thing:

Quote:
Originally Posted by mafiltenborg View Post
Can ssh into the box from another (Debian) box. Can also scp single named files from the shell. Nice, but i'd like to do better than that. Accessing the server from e.g. one of the window-panes in mc or Krusader - or the Windows(TM) TotalCommander(R) - would be desirable.
mc supports ssh as well as ftp natively, just like konqueror. Try it. Just pick open shell connection from the menu and use this:

Code:
/#sh:user@server
Conveniently adjusted of course. You can get complete help for this in either the mc help system or the mc man page.
 
Old 02-16-2009, 06:42 AM   #8
mafiltenborg
Member
 
Registered: Jan 2004
Location: Denmark
Distribution: Debian, Debian, Debian
Posts: 81

Original Poster
Blog Entries: 3

Rep: Reputation: 19
Quote:
Originally Posted by syg00 View Post
putty - would have to have scp and/or sftp (guessing, haven't tried).
Yup - i'm working with putty right now. Perhaps also WinSCP will do. Dunno - our company-provided proxy 'solution' (aka 'network jail') is acting up! I have to sort out this issue before i can tell.
Linux-boxes all work ok, since they're on a separate net.
 
Old 02-16-2009, 11:21 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
I'd recommend installing cygwin/X in windows instead of putty. This will give you an X terminal and much of the unix environment.

This howto gives instructions in running sshd in cygwin, which would allow you to connect remotely to the Linux server, and then run konqueror. This would enable you to ssh back inside of konqueror using the fish:/ protocol.

You can instead run the third party WinSCP client.
 
Old 02-17-2009, 02:14 AM   #10
mafiltenborg
Member
 
Registered: Jan 2004
Location: Denmark
Distribution: Debian, Debian, Debian
Posts: 81

Original Poster
Blog Entries: 3

Rep: Reputation: 19
Quote:
Originally Posted by jschiwal View Post
I'd recommend installing cygwin/X in windows instead of putty. This will give you an X terminal and much of the unix environment.

This howto gives instructions in running sshd in cygwin, which would allow you to connect remotely to the Linux server, and then run konqueror. This would enable you to ssh back inside of konqueror using the fish:/ protocol.
I need a ssh-connection. Nothing more. So now you've made me wonder why i should go to all the trouble of installing a cygwin environment and on top of that cygwin environment run an X client on top of which i'd then have to run an Xterm, in which i should execute an ssh-client - when putty, a native Windows ssh-client, will do the trick just fine.

cygwin is a massive install - i know because most of the tools i use at work use it to port easily to Windows (eCosCentric SDK & OpenAT SDK).

putty is one tiny file - no install, just run.

Getting Konqueror to run may bring me the fish:-protocol. but so does running any other KDE-app, and i particularly dislike Konqueror. It reminds me of a souped-up version of Windows Explorer - which i also don't like.

AFAIK i don't need the fish-protocol at all. SCP is what counts here, and on Windows-hosts WinSCP will do the trick nicely.

On the subject of cygwin: Why bother? Loading e.g. VirtualBox and a real distro will bring you all the toys - if you have that need. And 100% portability too, along with complete sandboxing, state-saving between sessions and the list goes on... But again - as with cygwin/X this requires huge amounts of memory/hd, is relatively cumbersome to execute and generally no sensible way of accomplishing a task, if a shorter route or simpler tool exists. I'm not arguing this can't be done, merely that there's a smarter way. Actually, i've noticed that 'userfriendly' GUI-apps tend to produce nearly as much noise as they help remove. Getting back to basics - shellcommands e.g. - often solves problems in a much more elegant and insight-bringing way. One fine example would be 'Irreversibly wiping a harddisk': Windows-devotees tend to wander off into a jungle of big, all-inclusive, complex tools - never to be seen again. This is also possible with Linux, sure enough. But if you know about dd, it's easy and fast! It's a matter of tapping a simple one-liner in the shell to have your diskheads spew a sh*tload of random bits onto every single location on the entire drive - as fast as the controller can execute! Absolute, total and irreversible data destruction in five seconds flat! It will take you longer to find a GUI-app in the menus...
Knowing about dd also makes it a snap to grab bootloaders, create floppydisk-images an other goodies

But now i'm clearly moving off-topic...

Thanks for all your advice. Over and out for now

Last edited by mafiltenborg; 02-17-2009 at 04:06 AM. Reason: Got interrupted by work :)
 
  


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
Rsync server with ssh transport ! jimmyjiang Linux - Software 8 03-29-2012 05:39 AM
Setting - Directory / File colors for SSH terminal connections young_rhkid Linux - Newbie 5 08-27-2011 06:39 AM
Copying a single file into each directory of a directory tree mlapl1 Linux - Newbie 2 06-27-2007 10:18 PM
How to protect a file/directory in your home login directory (RH Linux) jitsenho Linux - Security 9 07-03-2006 11:08 PM
file transfer over ssh restrict directory browsing niall0s Linux - General 11 09-11-2003 02:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:37 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