ieure / ssh-el Goto Github PK
View Code? Open in Web Editor NEWSupport for remote logins using ssh in Emacs
License: GNU General Public License v2.0
Support for remote logins using ssh in Emacs
License: GNU General Public License v2.0
Using cygwin's latest emacs, 24.5.1 (i686-pc-cygwin) of 2015-06-23...
M-x ssh -i ~/.ssh/<identityfile>
fails even as M-x ssh -i C:\Users\Jerry\.ssh\<identityfile>
succeeds
Oddly enough, under NT Emacs, that is, the native emacs windows port, M-x ssh -i ~/.ssh/<identityfile>
seems to work.
I tried to use ssh -i to ssh into an amazon ec2 instance.
M-x
ssh arguments (hostname first) ssh [email protected] -i ~/.ssh/amazon-devel.pem
Warning: Identity file ~/.ssh/amazon-devel.pem not accessible: No such file or directory.
Permission denied (publickey).
Process *ssh [email protected]* exited abnormally with code 255
But it works from inside a shell
$ ssh -v [email protected] -i ~/.ssh/amazon-devel.pem
OpenSSH_7.1p1, OpenSSL 1.0.2e 3 Dec 2015
debug1: Reading configuration data /c/Users/Jerry/.ssh/config
debug1: Connecting to ec2...] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Jerry/.ssh/amazon-devel.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Jerry/.ssh/amazon-devel.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
...
debug1: Entering interactive session.
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-48-generic x86_64)
...
Last login: Sat Jan 16 22:26:25 2016
ubuntu@ip:~$
...
I believe the issue is that the elisp ssh is not doing the file name expansion that the shell does before exec'ing the actual ssh.
I think this is an issue because
The following parses correctly:
(ssh-parse-words "192.168.1.6 -l me -o 'RemoteCommand hostname'")
=> ("192.168.1.6" "-l" "me" "-o" "RemoteCommand hostname")
Here is the problem:
(ssh-parse-words "192.168.1.6 -l me -o 'ConnectTimeout 1'")
("192.168.1.6" "-l" "me" "-o" "'ConnectTimeout" "1'")
If I change the 1
to one
it parses correctly (but, of course, this will not be accepted by ssh itself):
(ssh-parse-words "192.168.1.6 -l me -o 'ConnectTimeout one'")
("192.168.1.6" "-l" "me" "-o" "ConnectTimeout one")
I guess the regular expression in ssh-parse-words
needs to be adjusted, but regexs are a black art to me.
Mostly because default-directory
isn't tracking on the remote side. This is fixed by #3.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.