I wonder if anyone out there uses ssh through the emacs shell. I am able to connect with the remote machine but I cannot open files to view/edit with emacs using \'emacs filenam
You could use ssh x forwarding to run a remote emacs and display it on the local computer.
I use Xming X Server when I'm on Windows
You could mount the remote filesystem with ssh and open the locally as normally.
For this I use ExpanDrive (commercial app) when on Windows
You could use emacs Ange ftp over ssh it can open remote files over ftp and ssh.
I use this with cygwin when on Windows
Emacs option for ssh : c-x c-f /ssh:user@host:/home/path/
For Reference: Open file via SSH and Sudo with Emacs
A couple of ideas
. ~/.bashrc
and/or rearrange your bash init files and ~/.profile
so that this gets loaded inside the emacs shell; then running ssh
inside the Emacs shell works just fineI have been struggling with Xming, which works, but as my internet connection is not the fastest I have to wait more 30 seconds before emacs or any X app even shows up. Also scrolling through a buffer after it has been opened will freeze from time to time => Very annoying
Try No machine (nxserver-freenx server/client). There are free edition servers, absolute the best and fastest solution when you want to connect to a Linux box and use xterm and emacs over X. It shows up immediately and responds so fast. Even over a really slow connection :-) Clients are available for Windows, Mac OS, Linux
Emacs has term-mode which is full blown terminal emulator you can run emacs in emacs. Anything you run on terminal will run in term-mode
Also emacs has tramp mode which can open files through ssh.
/scp:user@ipOrHost#port:/
it will transfer files back and forth. you just edit them as you would edit local files.
No need for x11 forwarding or other shenanigans.
It may not be obvious on first sight, but eshell
, the shell that is
implemented in Emacs Lisp works fine with tramp
:
Welcome to the Emacs shell
~ $ uname -a
Linux local-machine 2.6.30-1-686 #1 SMP Thu Jul 30 14:45:30 UTC 2009 i686 GNU/Linux
~ $ cd /ssh:user@remote-machine:~
/ssh:user@remote-machine:/home/user $ uname -a
Linux remote-machine 2.6.18-6-686 #1 SMP Thu Aug 20 21:56:59 UTC 2009 i686 GNU/Linux
/ssh:user@remote-machine:/home/user $