18
votes
Magit, how to use system's ssh agent and don't ask for password
Another solution for the lazy is to just use a package that handles exactly this case (setting Emacs' keychain-related environment variables):
Install and add to your init.el package keychain-...
15
votes
Accepted
How can I quit Emacs from within a term within Emacs?
There are a few answers here.
Quitting Emacs without C-x C-c
First, you can quit emacs by running the command that C-x C-c is bound to: M-x save-buffers-kill-terminal.
Alternatives to recursive ...
15
votes
Accepted
Use sudo while editing over SSH?
Using TRAMP multi-hops. For instance, if you want to edit the remote file /root/salary.txt
/ssh:homer@powerplant|sudo:powerplant:/root/salary.txt
The example is taken from the Mastering Emacs book.
14
votes
fix or workaround: "Terminal is not fully functional"
Quick answer
That's not an issue, it's a statement of fact. M-x shell isn't a fully functional terminal - it simply can't do what you want it to do. If you want a full terminal emulator in emacs, you ...
13
votes
Magit asks for passphrase for ssh key every time
Running ssh-agent and hoping for the best is not enough. ssh-agent hands out the decrypted private key to everyone asking on a specific socket. The problem is that the socket is not always the same ...
11
votes
Tramp unable to open some files
I had a similar problem when trying to open/save plain ASCII files via tramp's sftp: the files were fine, I was able to edit them with, for example,nano, but trying to open them via tramp would get ...
9
votes
Accepted
Tramp with 2-factor authentication
You'll have to customize the tramp-password-prompt-regexp variable with the second prompt to finish the 2-factor authentication. The remote shell setup part of the manual has a simple example.
This ...
7
votes
TRAMP is unbearably slow (OSX, ssh)
I know it's an old question and that you maybe don't care about the answer now but I do faced the same issue.
I was pretty sure it was OS X related but in fact lags and timeouts were caused by my ...
7
votes
Can Emacs use tramp to run in an interactive session on a remote HPC node?
It sounds like you should extend tramp-methods, adding a new method which is similar to the sudo method but uses qsub -I instead. You would then be able to use a multi-hop tramp path to first connect ...
6
votes
Can Emacs use tramp to run in an interactive session on a remote HPC node?
I have been struggling to do the same. I found a different route that allowed me to do basically the same thing.
You can open a shell buffer by M-x shell and from there connect to the login node, and ...
6
votes
Tramp: how to add (-A) agent forwarding to ssh connections?
After suggestions...
(defun add-ssh-agent-to-tramp ()
(cl-pushnew '("-A")
(cadr (assoc 'tramp-login-args
; if on Windows using Putty with Pageant,
...
6
votes
Accepted
Emacs suspend at startup ssh connection issue
Similar to Emacs bug#20015, this can be avoided by setting tramp-ssh-controlmaster-options before loading tramp.
(setq tramp-ssh-controlmaster-options
"-o ControlMaster=auto -o ControlPath='...
6
votes
Accepted
Magit doesn't recognise git repo through ssh connection
Error (magit): Magit requires Git >= 1.9.4, you are using 1.8.3.
I've already installed git 2.10.0 on /usr/local/git
The list of directories to search for executables on remote hosts is ...
6
votes
fix or workaround: "Terminal is not fully functional"
If you don't care about whether Emacs is a "fully-functional" terminal or not and you just want it to work without making you press enter, then run the psql command \pset pager off. This ...
6
votes
Emacs 26.1 RC1 display issues over SSH/X11 with xming/vcxsrv
Emacs 26 by default switches on double buffering for X servers when it finds the Xdbe header on the build machine. (See Emacs 26 release notes at the GitHub mirror.) Some X servers don’t support this. ...
6
votes
Accepted
Emacs find-file over SSH is too slow to connect
Indeed, Tramp doesn't like your fancy prompt. The Tramp manual explains what to do, the FAQ section. In short, you shall add to your remote .profile
[[ $TERM == "dumb" ]] &&...
5
votes
Accepted
How can I use Emacs in a SSH sever that I logged in through emacs terminal?
There is Tramp. You can edit a file on another machine using the syntax /ssh:user@machine:/path/to/file. If you take sudo instead of ssh, and empty user and machine, you can edit a local file as root. ...
5
votes
Accepted
How to sudo save file in TRAMP mode?
Have you tried the multi-hop method as suggested in the TRAMP manual?
C-x C-f /ssh:user@localhost|sudo:localhost:/path/to/file RET
5
votes
Magit how to use ssh key rather than being prompted for password
Edit ~/.ssh/config so that it contains the following:
Host github.com
IdentitiesOnly yes
IdentityFile ~/.ssh/your_ssh_key
Then whenever magit asks git to ask ssh to talk to github.com, ssh will ...
5
votes
Accepted
tramp-default-method has no effect
With Tramp 2.3 / Emacs 26.1, Tramp's syntax has changed. It requires now the method name mandatory. If you want the shorter version of Tramp file names (without the method), you must change the syntax ...
5
votes
Accepted
How to make TRAMP aware of VPNs?
The answer to any engineering question that starts with “Can I have…” is almost always yes. The real question is how much work it will take, and whether it is worth it.
You haven’t said what operating ...
5
votes
Tramp mode - Copying files
You can use dired-async-do-copy from emacs-async to Run ‘dired-do-copy’ asynchronously.
4
votes
Accepted
Tramp: how to add (-A) agent forwarding to ssh connections?
Starting with Tramp 2.2.13, you will be able to overwrite entries of tramp-methods. In your case, you would do something like
(add-to-list 'tramp-connection-properties
(list (regexp-...
4
votes
TRAMP vs ssh to remote emacs
A third variant is to mount the remote directories via sshfs and access them via your local Emacs. This has the advantage that you don't have to reproduce your Emacs setup on the remote machine(s) ...
4
votes
Accepted
File and directory autocompletion in remote shell
Try this
Open a remote directory in dired using tramp.
C-x d /ssh:username@hostname:/path return
Start a remote shell.
M-x shell
4
votes
Accepted
Tramp: Waiting for prompts from remote shell... Sending command `exec ssh -e none bin'
The message Sending command 'exec ssh -e none bin' is a clue that an error is occurring when exec-path-from-shell reads the path from the shell environment.
Once I figured this out, I checked my ....
4
votes
"Invalid base64 data" error when using tramp
The Edison didn't have some of the utilities tramp needs (base64, uuencode). Apparently tramp sends a perl script if it can't find them, but it did not work. It turns out that even when using ...
4
votes
Magit how to use ssh key rather than being prompted for password
The issue was that the remote url was set to https rather than ssh
following these steps fixed the issue https://help.github.com/articles/changing-a-remote-s-url/
4
votes
Accepted
How can Magit add a credential to ssh-agent?
You can use the ssh-agency package for this. It integrates with magit, and will run ssh-add as needed when you push. If you don't have ssh-askpass installed, you will need a version which includes ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ssh × 149tramp × 91
remote × 20
magit × 13
shell × 10
terminal-emacs × 10
microsoft-windows × 8
eshell × 8
x11 × 7
spacemacs × 5
dired × 5
org-mode × 3
key-bindings × 3
helm × 3
git × 3
term × 3
linux × 3
server × 3
sudo × 3
osx × 2
emacsclient × 2
ess × 2
ansi-term × 2
performance × 2
emacs-daemon × 2