tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using tramp with "RemoteCommand"


From: Daniel Gomez
Subject: Using tramp with "RemoteCommand"
Date: Tue, 28 Mar 2023 15:48:04 +0000

I would like to tramp into a compute node of an HPC cluster.
That requires an ssh connection to a login node and then using `srun` to request an interactive session. If using a terminal, all I need is to set up the following on my .ssh/config, and then `ssh computenode` gets me directly to the compute node:

```
Host computenode
     User user
     HostName loginnode.edu
     IdentityFile ~/.ssh/id_loginnode
     RequestTTY yes
RemoteCommand srun --partition=partition --account=account --gpus=1 --pty /usr/bin/zsh
```

However, when connecting via TRAMP this doesn't work, because [apparently TRAMP cannot be used with "RemoteCommand".][1]

**Question: How can I use TRAMP with RemoteCommand, or how can I have Tramp connect directly to an HPC compute node with `srun`?**

Note: [a similar question was asked at the Emacs Stack Exchange][2] with a proposal to connect to an HPC by defining a "qsub" tramp-method; but I tried to define something similar for "srun" and it does not seem to work (but if anyone has a counter-example I'd be happy to give it a try).


[1]: https://www.gnu.org/software/emacs/manual/html_node/tramp/Remote-shell-setup.html [2]: https://emacs.stackexchange.com/questions/12899/can-emacs-use-tramp-to-run-in-an-interactive-session-on-a-remote-hpc-node

If anyone has any suggestions or other approaches that would work, I'd be happy to test them out. Ideally I would like to be able to use `dired` and `run-python` on the compute node, just like I would on a normal remote development workflow.

Regards,
Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]