thingalon / pony-ssh Goto Github PK
View Code? Open in Web Editor NEWvscode plugin for fast remote editing over ssh
License: MIT License
vscode plugin for fast remote editing over ssh
License: MIT License
I am having an issue using PonySSH 0.6.0 in the current vscode version 1.58.2.
When trying to open up a folder per "Pony SSH: Open Remote folder" I get an error messager stating command 'ponyssh.openFolder' not found
So far I tried reinstalling Pony SSH, Disabling an reenabling it, and I even reset my Code AppData folder. I do have Setting sync turned on though.
Heya,
This plugin is really awesome and I wonder why its not part of the main VS Code suite, I love it!
Just wanted to check if there is a setting or so, perhaps hidden, to make the plugin only connect to SSH hosts when the file tree of that specific connection is expanded?
Noticed today that when I have one host offline, the plugin just continuously tries to connect indefinitely and pops up error messages that the connection timed out and such.
Hope this can be fixed ๐
Thanks in advance!
I have a lot of things like this in my ~/.ssh/config
, as I'm sure others do:
Host blah
Hostname blah # only reachable from within blah's network
ProxyCommand ssh blah-proxy -W %h:%p
None of the options from the README seem to support such a setup, I think Pony doesn't even read ~/.ssh/config
. Is there any, perhaps undocumented, way of connecting to a host such as "blah"?
Hello,
glad that this extension exists - thank you for your work!
I'd like to suggest something:
The settings.json
file should probably not be treated as a secure place to store passwords & other confidential information.
Extensions like https://github.com/shanalikhan/code-settings-sync allow you to backup your settings and the settings.json
file is obviously included.
And while the backup gist is private by default, you can set it to public to allow other people using it.
Thus if someone makes it public, they could leak their passwords.
I don't know where'd you store the passwords though - it'd probably be best not to store them anywhere & just use ssh keys:D
(this is just an fyi, I'm not working w/ security etc)
As you likely know you can tag old commits, too, and you can even have the correct date for them.
As this extension didn't have too much tags (does it?) I'd create a script to post-add them.
Having tags would:
As I've said I volunteer to provide a script for post-adding the old ones (going by package.json and/or Changelog), but this would only be useful if new versions are tagged later on, too. What do you think?
Tagging new versions also provides a nice way to let people know about them (when subscribing to the tags) and also allows to use CD like GitHub actions to auto-publish to multiple marketplaces, if that's something that you'd like to have.
At the moment, when I open a terminal while using Pony SSH, I need to launch a remote shell with ssh manually.
Would be amazing if this extension would auto-ssh when you open a shell, no?
The gotcha I can think of is you might have multiple SSH folders added as far as I know you would then need to select one.
Using OpenSSH I can directly login to other machines because of Kerberos authentication (user name is enough). It would be nice to be able to do the same with pony-ssh as this removes the current need for an SSH agent running.
Environment
VS Code on Windows 10 trying to connect to FreeBSD 12.0. Connecting using private key file.
Error
Unable trying to connect to remote host. Logs below:
[2019-12-15 02:02:58] [info] Connection established
[2019-12-15 02:02:58] [info] Preparing worker script
[2019-12-15 02:02:58] [info] Worker script ok
[2019-12-15 02:02:58] [info] Opening workers
[2019-12-15 02:02:58] [info] Remote home directory: /home/jhfoo/
[2019-12-15 02:02:58] [info] Connected to jack
[2019-12-15 02:02:58] [warn] Channel STDERR output: <Buffer 54 72 61 63 65 62 61 63 6b 20 28 6d 6f 73 74 20 72 65 63 65 6e 74 20 63 61 6c 6c 20 6c 61 73 74 29 3a 0a 20 20 46 69 6c 65 20 22 2f 68 6f 6d 65 2f 6a ... 825 more bytes>
[2019-12-15 02:02:58] [error] Connection error: Unexpected end of worker channel
[2019-12-15 02:02:58] [error] Connection error: Unexpected end of worker channel
[2019-12-15 02:02:58] [error] Connection error: Unexpected end of worker channel
Tested
Same failure on Python 2.7, 3.6, 3.7.
Pardon my ignorance, but is there a debug log I can look at? The error I'm getting does't really tell me the problem.
[2022-06-29 23:16:06] [error] Error connecting to Dev Workspace: All configured authentication methods failed
[2022-06-29 23:16:06] [info] Connecting to Dev Workspace: {
host: 'my-server.local',
username: 'newhalld',
agent: '/private/tmp/com.apple.launchd.OVsCXwd1YD/Listeners',
path: '~/workspaces',
privateKeyFile: '/Users/newhalld/.ssh/id_rsa',
passphrase: '*****',
privateKey: '*****'
}
This works:
$ ssh -i /Users/newhalld/.ssh/id_rsa [email protected]
Last login: Wed Jun 29 23:07:19 2022 from 10.106.101.14
codium config:
"ponyssh.hosts": {
"Dev Workspace": {
"host": "my-server.local",
"username": "newhalld",
"agent": true,
"path": "~/workspaces",
"privateKeyFile": "/Users/newhalld/.ssh/id_rsa",
"passphrase": ""
}
}
Hi, thank you for creating pony-ssh,
I get an error trying to connect to a remote host running Fedora 31 & Python 3.7. I'm using v0.3.0. Happy to help debug this further.
[2020-02-03 10:26:56] [info] Connection established
[2020-02-03 10:26:56] [info] Preparing worker script
[2020-02-03 10:26:57] [warn] STDERR output during worker upload: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 10: invalid start byte
[2020-02-03 10:26:57] [error] Error connecting to beddari: Error code 1 while uploading worker script. STDERR says: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 10: invalid start byte
The Open VSX Registry does not include any ssh client yet - please publish your extension there (that's really simple via npx ovsx
and similar to publishing to the MS marketplace).
Details on the publishing can be found at https://github.com/eclipse/openvsx/wiki/Publishing-Extensions.
Please consider adding support for ssh config files or adding JumpHost support (accessing an ssh server over another ssh gateway). For details on how that looks on linux, see https://wiki.gentoo.org/wiki/SSH_jump_host
"ponyssh.hosts": {
"domain.tld": {
"host": "domain.tld",
"username": "username",
"privateKeyFile": "path/to/keyfile",
"passphrase": "",
"agent": true
}
}
This results in [info] Connecting to domain.tld being run indefinitely, it does not ask for a password and the logs show nothing else
I tried both openssh key file format and putty key format (ppk), neither works
I have deleted some files in my remote server by mistake. I found that particular file in my Cache folder, but I'm unable to open it. Is there by any chance I can recover the content of this file.
/Users/XXX/Library/Application\ Support/VSCodium/User/globalStorage/thingalon.pony-ssh/cache/automation/files/home/python_file_name.py
Host Windows 10
Remote OpenBSD 7.0
VSCodium 1.66.2
PonySSH 1.5.0 (Open VSX)
Remote Python 3.8.12
"ponyssh.hosts": {
"homelab": {
"host": "remote",
"username": "user",
"password": true,
"python": "/usr/local/bin/python3"
}
}
[2022-04-13 22:48:40] [info] Connecting to homelab: {
host: 'remote',
username: 'user',
password: '*****',
python: '/usr/local/bin/python3'
}
[2022-04-13 22:48:40] [info] Connection established
[2022-04-13 22:48:40] [info] Preparing worker script
[2022-04-13 22:48:40] [info] Worker script ok
[2022-04-13 22:48:40] [info] Opening workers
[2022-04-13 22:48:41] [info] Remote home directory: /home/user/
[2022-04-13 22:48:41] [info] Connected to homelab
[2022-04-13 22:48:41] [warn] Channel STDERR output: Traceback (most recent call last):
File "/home/user/.pony-ssh/worker.zip/__main__.py", line 38, in run_worker
File "/home/user/.pony-ssh/worker.zip/handlers.py", line 102, in handle_file_read
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.vscode/settings.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/user/.pony-ssh/worker.zip/__main__.py", line 55, in <module>
File "/home/user/.pony-ssh/worker.zip/__main__.py", line 45, in run_worker
File "/home/user/.pony-ssh/worker.zip/errors.py", line 46, in process_error
AttributeError: module 'errno' has no attribute 'ENODATA'
[2022-04-13 22:48:41] [error] Connection error: Unexpected end of worker channel
[2022-04-13 22:48:41] [error] Connection error: Unexpected end of worker channel
[2022-04-13 22:48:41] [error] Connection error: Unexpected end of worker channel
[2022-04-13 22:48:41] [error] Connection error: Unexpected end of worker channel
[2022-04-13 22:48:41] [error] Connection error: Unexpected end of worker channel
copying over settings.json from the host changes the error to task.json; so creating all of vscode's configs (not tested yet) would probably fix this issue but it could affect other things. I don't think my Linux remote needed vscode configs (and crashed alongside it) but i could be wrong as it has been a while and i don't have it anymore
As the Password APIs are still part of the "Proposed extension APIs" these seem to not be useable in master yet. I guess it still would be reasonable to inspect those in a branch now, allowing to give feedback as long as those are "proposed" and pull the trigger to master once they are moved to stable.
as far as i tried vsc does not discover my .git folder on the target server, and therefore the remote-folder is not a git-repo... fixable or do i miss some configuration? would be nice to get this working (my ssh-user has the rights and that .git folder is visible if i remove the exclude in the vsc config)
First of, thanks for this, works perfect in OSX with "agent" :)
However I do see an error, that seem to be about just failing to create cache dirs:
`[2019-04-21 19:06:28] [warn] Error while cleaning up cache directory: ENOENT: no such file or directory, scandir '/Users/userA/Library/Application Support/Code/User/globalStorage/thingalon.pony-ssh/cache/testSSH/files'
On windows 10, I added below conf to my settings.json. I'm using Mobaxterm, which manages pageant & server X.
"ponyssh.hosts": {
"mylinux": {
"host": "192.168.1.37",
"username": "frederic",
"privateKeyFile": "C:/pathtomykey/id_rsa",
"python": "/usr/bin/python3.9"
}
}
And I get that output in vs code:
[2021-04-26 19:24:05] [info] Connection established
[2021-04-26 19:24:05] [info] Preparing worker script
[2021-04-26 19:24:05] [error] Error connecting to mylinux: Remote host does not have Python installed
[2021-04-26 19:24:05] [info] Connecting to mylinux: {
host: '192.168.1.37',
username: 'frederic',
privateKeyFile: 'C:/pathtomykey/id_rsa',
agent: 'pageant',
privateKey: '*****'
}
on Linux:
$ whereis python
python: /usr/bin/python3.9-config /usr/bin/python3.9 /usr/lib/python2.7 /usr/lib/python3.9 /etc/python3.8 /etc/python3.9 /usr/local/lib/python3.9 /usr/include/python3.9
What did I do wrong?
If executeCommand is specified, it is executed on the remote host on login.
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.