LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Opening remote files (during ssh session) with applications on local computer? (http://www.linuxquestions.org/questions/linux-newbie-8/opening-remote-files-during-ssh-session-with-applications-on-local-computer-180005/)

The_Fed 05-10-2004 02:14 PM

Opening remote files (during ssh session) with applications on local computer?
 
Hello all!


I have an ssh session running.Now i want open the files on the remote system using software on my (local system).For example i want to open a file " exam.txt" on the remote system using a my local text editor application.

Hope i am clear.

Thank you
The Fed(ora) user.

calble 05-10-2004 02:54 PM

Well two ways come to mind to help you work around your problem. Neither of them are exactly what you are wanting, but could be at least a workaround. First you could install you text editing program on the remote machine. Second you could transfer your text file to your machine and then transfer it back. You would go about using a program that supports scp, sftp, or ftip protocols. I am a mandrake user and I just use DrakSync. You could probably use gftp to login and navigate your files much like ftping into a web server.

Hope that helps some,
Noah

Tinkster 05-10-2004 03:43 PM

Re: Opening remote files (during ssh session) with applications on local computer?
 
Quote:

Originally posted by The_Fed
I have an ssh session running.Now i want open the files on the remote system using software on my (local system).For example i want to open a file " exam.txt" on the remote system using a my local text editor application.
Clear but impossible ... you could pipe the file into
a local session, but you couldn't save it back into
the stream you used to get it there... as calble pointed
out, copying the file or running a remote editor are the
only real options.

Unless, of course, you mean sed or awk when you say
local editor application ;)


Cheers,
Tink

zexxxx 05-10-2004 05:20 PM

Here's my assumptions based on your post:
- Your local text application is GUI based (Eg: Xemacs)
- You are running the SSH session in the GUI (X, KDE, Gnome, etc)
- You can install stuff on the remote machine

Your solution:
- Install your text application on the remote machine
- In the SSH session
# export DISPLAY=IPOFLOCALMACHINE:0
# editorpath exam.txt &

For example:
# export DISPLAY=192.168.1.5:0
# xemacs exam.txt &

The remote application will display on your local machine.

NOTE: You will need to ensure the XDM protocol is allowed on your local machine. Check out http://www.tldp.org/HOWTO/XDMCP-HOWTO/ for more details on that.

NOTE: Also, note that your firewall on the local and remote machines might cause problems. Ensure the right ports are opened. (Search /etc/services for xdm I think)


All times are GMT -5. The time now is 01:09 AM.