coder / sshcode Goto Github PK
View Code? Open in Web Editor NEWRun VS Code on any server over SSH.
License: MIT License
Run VS Code on any server over SSH.
License: MIT License
Hello,
Can you adapt the code to work on a remote ARM machine ?
For example, for : Odroid ARMBIAN 5.38 (Ubuntu 16.04.6 LTS)
Currently we have the following error message:
bash: / tmp / codessh-code-server: can not execute binary file: Exec format error
Thank you in advance.
Thanks for the wonderful work on sshcode and code-server. I've been using code-server for a few weeks now and it's changed my workflow completely!
Unfortunately, I'm hitting an issue when I try to use sshcode with the vscodevim extension. It prevents all keyboard input when activated, and the "Activating extensions..." message keeps flashing in the bottom tray. Disabling the extension reactivates input.
I don't see any error messages in the Log regarding the extension. Any idea what may be the culprit?
I installed sshcode on macos and connecting to an Ubuntu 16.04 VM.
So, as the usage of envVariables is to set path for config and ext directories,
but when i set them to my OOS build of vscode, it says no such file or directory exists.
I put these in my .bashrc
export VSCODE_CONFIG_DIR="$HOME/.config/Code - OOS/User"
export VSCODE_EXTENSIONS_DIR="$HOME/.vscode-oos/extensions"
and I get:
Server file no newer than local file ‘latest-linux’ -- not retrieving.
+ '[' -f /tmp/codessh-code-server ']'
+ rm /tmp/codessh-code-server
+ ln latest-linux /tmp/codessh-code-server
+ chmod +x /tmp/codessh-code-server
2019-04-24 17:24:05 INFO syncing settings
sending incremental file list
rsync: change_dir "/home/sahil/.config/Code - OOS/User" failed: No such file or directory (2)
sent 72 bytes received 12 bytes 33.60 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]
2019-04-24 17:24:07 FATAL failed to sync settings: failed to rsync '/home/sahil/.config/Code - OOS/User/' to 'myserver:.local/share/code-server/User/': exit status 23
If I put
export VSCODE_CONFIG_DIR="$HOME/.config/Code\ -\ OOS/User"
export VSCODE_EXTENSIONS_DIR="$HOME/.vscode-oos/extensions"
I get same error:
Server file no newer than local file ‘latest-linux’ -- not retrieving.
+ '[' -f /tmp/codessh-code-server ']'
+ rm /tmp/codessh-code-server
+ ln latest-linux /tmp/codessh-code-server
+ chmod +x /tmp/codessh-code-server
2019-04-24 17:12:16 INFO syncing settings
sending incremental file list
rsync: change_dir "/home/sahil/.config/Code\ -\ OOS/User" failed: No such file or directory (2)
sent 72 bytes received 12 bytes 24.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]
2019-04-24 17:12:19 FATAL failed to sync settings: failed to rsync '/home/sahil/.config/Code\ -\ OOS/User/' to 'myserver:.local/share/code-server/User/': exit status 23
I think there is some parsing issue while changing directory to the defined path.
sshcode gcp:test-kyle
We would execute gcloud compute ssh test-kyle -- <ssh flags>
instead of the normal SSH command.
Tried to specify a different port for ssh on my server
sshcode [email protected]:port
returns error
sshcode [email protected] --ssh-flags '-p xxxx'
is ignored
How should it be done?
https://github.com/codercom/sshcode/blob/cb036d8b8c45a43ebc804e085202f4feff84e8d1/main.go#L307
Path to the config directory is hardcoded here ( $HOME/.config/Code/User/
),
the unofficial builds doesn't use this path,
they use $HOME/.config/Code - OSS/User/
instead.
(I'm not sure about Mac paths)
We should probably support them as well.
EDIT:
Also, VSCodium uses $HOME/.config/VSCodium/User/
Getting 403 error while downloading code-server on Ubuntu 18.04, no extra config in wgetrc
+ mkdir -p /root/.local/share/code-server
+ cd /tmp
+ wget -N https://codesrv-ci.cdr.sh/latest-linux
--2019-04-26 17:13:57-- https://codesrv-ci.cdr.sh/latest-linux
Resolving codesrv-ci.cdr.sh (codesrv-ci.cdr.sh)... 104.27.133.26, 104.27.132.26, 2606:4700:30::681b:841a, ...
Connecting to codesrv-ci.cdr.sh (codesrv-ci.cdr.sh)|104.27.133.26|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2019-04-26 17:13:57 ERROR 403: Forbidden.
2019-04-26 18:13:57 FATAL failed to update code-server: exit status 8
---ssh cmd---
ssh [email protected] /bin/bash
---download script---
set -euxo pipefail || exit 1
mkdir -p ~/.local/share/code-server
cd /tmp
wget -N https://codesrv-ci.cdr.sh/latest-linux
[ -f /tmp/codessh-code-server ] && rm /tmp/codessh-code-server
ln latest-linux /tmp/codessh-code-server
chmod +x /tmp/codessh-code-server```
Will clean up some of the CLI processing code.
Lovely project, can't wait to integrate it into my day to day workflow, but I've hit a reasonably major problem. The shortcuts I would consider important (Ctrl+X, Ctrl+C, and Ctrl+V) won't work if no text is selected.
Steps to reproduce:
- Clean Ubuntu 18.04 install
- Install Chrome & Git
- Install sshcode
- Run sshcode to Ubuntu 18.04 host
- Ctrl + X not working , nor is Ctrl + C, Ctrl + V, etc..
With a clean VSCode install Ctrl + X will delete the line if nothing is highlighted, same thing for Ctrl + C, etc...
Feature req:
Add version output on execution
I'm getting "zsh: command not found: sshcode" when running sshcode user@ip from my Mac.
I installed go and ran "go get -u go.coder.com/sshcode" before this.
Are there any additional steps I may need to get this working?
My remote server needs to use an http_proxy/https_proxy to download packages from internet. Can you add support for this? Usually I would add export http_proxy=someproxy:port
and export https_proxy=someproxy:port
to the beginning of my script.
Even better, can we have an option to run some commands (like the export
s above) before sshcode starts executing?
🤔
When installing Chrome from the AUR you get google-chrome-stable
as the command.
For Reference: https://github.com/codercom/sshcode/blob/cb036d8b8c45a43ebc804e085202f4feff84e8d1/main.go#L181-L188
I get a blank screen. The window opens, but it has no content at all (not even menus or any ui thing)
I'm using ubuntu mate 19.04 with go version go1.10.4 linux/amd64
jperelli@coffee~ $ /home/jperelli/go/bin/sshcode [email protected]
2019-04-23 20:19:04 INFO ensuring code-server is updated...
INFO WebSocket closed / {"client":1,"code":1001}
INFO Retrying shared process in 3s {"error":"Exited unexpectedly"}
INFO Lost connection to shared process. Retrying in 3s.
+ mkdir -p /root/.local/share/code-server
+ cd /tmp
+ wget -N https://codesrv-ci.cdr.sh/latest-linux
--2019-04-23 20:19:18-- https://codesrv-ci.cdr.sh/latest-linux
Resolving codesrv-ci.cdr.sh (codesrv-ci.cdr.sh)... 104.27.133.26, 104.27.132.26, 2606:4700:30::681b:851a, ...
Connecting to codesrv-ci.cdr.sh (codesrv-ci.cdr.sh)|104.27.133.26|:443... connected.
HTTP request sent, awaiting response... 304 Not Modified
File ‘latest-linux’ not modified on server. Omitting download.
+ '[' -f /tmp/codessh-code-server ']'
+ rm /tmp/codessh-code-server
+ ln latest-linux /tmp/codessh-code-server
+ chmod +x /tmp/codessh-code-server
2019-04-23 20:19:18 INFO syncing settings
sending incremental file list
sent 394 bytes received 15 bytes 272.67 bytes/sec
total size is 329,108 speedup is 804.67
2019-04-23 20:19:19 INFO synced settings in 1.071178972s
2019-04-23 20:19:19 INFO syncing extensions
INFO Starting shared process [9]... {"error":"Exited unexpectedly"}
sending incremental file list
WARN stderr {"data":"(node:26933) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.\n"}
INFO Retrying shared process in 3s {"error":"Exited unexpectedly"}
INFO Lost connection to shared process. Retrying in 3s.
sent 1,095,124 bytes received 5,376 bytes 146,733.33 bytes/sec
total size is 545,895,636 speedup is 496.04
2019-04-23 20:19:26 INFO synced extensions in 8.255285033s
2019-04-23 20:19:26 INFO starting code-server...
(node:27135) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
INFO code-server v1.903-vsc1.33.1
INFO Additional documentation: http://github.com/codercom/code-server
INFO Initializing {"data-dir":"/root/.local/share/code-server","extensions-dir":"/root/.local/share/code-server/extensions","working-dir":"/root","log-dir":"/root/.cache/code-server/logs/20190423181928338"}
INFO Starting webserver... {"host":"127.0.0.1","port":"10666"}
WARN No certificate specified. This could be insecure.
WARN Documentation on securing your setup: https://github.com/codercom/code-server/blob/master/doc/security/ssl.md
WARN Launched without authentication.
INFO
INFO Started (click the link below to open):
INFO http://localhost:10666/
INFO
INFO Starting shared process [1/5]...
INFO Starting shared process [10]... {"error":"Exited unexpectedly"}
WARN stderr {"data":"(node:27150) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.\n"}
INFO WebSocket opened / {"client":1,"ip":"127.0.0.1"}
Error: ENOENT: no such file or directory, open '/home/travis/build/codercom/code-server/packages/server/build/web/favicon.ico'
INFO WebSocket opened / {"client":2,"ip":"127.0.0.1"}
INFO WebSocket closed / {"client":1,"code":1006}
INFO Starting shared process [2/5]... {"error":"Exited unexpectedly"}
WARN stderr {"data":"(node:27158) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.\n"}
INFO Retrying shared process in 3s {"error":"Exited unexpectedly"}
INFO Lost connection to shared process. Retrying in 3s.
INFO WebSocket opened / {"client":3,"ip":"127.0.0.1"}
Error: ENOENT: no such file or directory, open '/home/travis/build/codercom/code-server/packages/server/build/web/favicon.ico'
WARN stderr {"data":"(node:27201) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.\n"}
INFO Starting shared process [11]... {"error":"Exited unexpectedly"}
When there is a jump server between localhost and code-server, and we should ssh to jump server and then go to code-server (not an IP), does sshcode still work?
More of a suggestion than anything else.
I saw this popup and was fascinated by it, job well done and it's very cool.
I work quite a bit with Crostini on ChromeOS, it's basically a Debian Container running inside of ChromeOS and from the main chrome browser you can hit "penguin.linux.test" and anything that is running there locally will show up. So if you launch code-server with --host 0.0.0.0 it will show up inside the ChromeOs browser and it works REALLY well.
Your code inspired me to spend a few hours yesterday whipping up https://github.com/Zate/codetini. I think though, that when I get some pieces worked out around launching the app, perhaps I might do a pull request against this code base to add a switch such as --local and/or --crostini to support this use case. maybe both with the --crostini just being able to assume a whole bunch of things because it's configured the same on each chromebook.
so just proposing a --local flag to download/update the binary locally, connect it to any user preferences and extensions you happen to have and bring it up as either an app or in a browser tab.
Currently if you have both google chrome and chromium installed, it will always pick google chrome. There should be a way to edit the order it checks or specify a browser.
Add option to upload code-server binary when there is no internet connection on the remote host.
See #1
Hi,
I was just wondering if CentOS support has been tested. I'm attempting to use this, and I get the following error output when starting code-server
:
/tmp/codessh-code-server: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /tmp/codessh-code-server)
/tmp/codessh-code-server: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /tmp/codessh-code-server)
/tmp/codessh-code-server: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /tmp/codessh-code-server)
2019-04-22 09:49:09 FATAL code-server didn't start in time context deadline exceeded
Would it be possible to add a Download
option to the context menu to download a file or directory to the local machine?
Would be super useful to do it from vscode rather than from some ftp client
Is there a way where multiple users can access the same server? Currently I'm unable to login using multiple users, for e.g, if root access it first - a higher privilege file is created that a normal user is unable to overwrite inside /tmp.
Is there a way to bypass this?
Developing in a normal browser window is a significantly worse UX than developing in a browser app window. I think some kind of warning when they don't get an app window is justified.
It could be an extra INFO log before we open the browser. That shouldn't be too annoying.
See #1
E.g. if the user has firefox set as the default browser.
See google chrome support
I excuted 'go get -u go.coder.com/sshcode ', sys returned as below.
package golang.org/x/xerrors: unrecognized import path "golang.org/x/xerrors" (https fetch: Get https://golang.org/x/xerrors?go-get=1: dial tcp 216.239.37.1:443: connect: connection refused)
there are ways ot use TLS certs on coder, but what if I'm using sshcode? anyway to specify a cert to be used to secure the traffic?
It would make sense to also have --extensions-dir
and --user-data-dir
flags, since both of those are available on code-server.
Is sshcode
supposed to work connecting to a Mac?
wget -N https://codesrv-ci.cdr.sh/latest-linux
wget
is not available by default. (curl is)cheers,
Just installed client on MacOS, but trying to close the window with cmd+W
or cmd+shift+W
results in a "Not implemented" error, but it is assigned in the editor keyboard shortcuts.
We currently cannot run the command on a server where other people are already using it. When running the script, it crashes at the moment it tries to delete /tmp/sshcode-code-server
because it is owned by another user. We should be able to pass an option to define the name of our tmp folder, for exemple the same name suffixed by /$USER
It's obnoxious for the remote server to have extensions I've deleted.
Is it possible for you to update sshcode so that it is not hardcoded to use 127.0.0.1 and give us the option to use 0.0.0.0. ChromeOS will not load anything except when it is forwarded to 0.0.0.0.
Should use Travis
adding a command line arg to indicate WHERE to get extensions from for sync would allow using different extension configs for different uses.
Right now we require rsync on the remote server.
I use sshcode in Macos,want to install vscode server to centos 7.5,report the following error:
sent 1712186 bytes received 20 bytes 311310.18 bytes/sec total size is 955763838 speedup is 558.21 2019-04-30 19:23:14 INFO synced extensions in 7.344483678s 2019-04-30 19:23:14 INFO starting code-server... 2019-04-30 19:23:14 INFO Tunneling local port 26914 to remote port 36692 [email protected]'s password: /tmp/sshcode-code-server: /lib64/libstdc++.so.6: version
GLIBCXX_3.4.20' not found (required by /tmp/sshcode-code-server)
/tmp/sshcode-code-server: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by /tmp/sshcode-code-server) /tmp/sshcode-code-server: /lib64/libstdc++.so.6: version
CXXABI_1.3.9' not found (required by /tmp/sshcode-code-server)
2019-04-30 19:23:30 FATAL error: code-server didn't start in time: context deadline exceeded`
Hello
I've just installed sshcode, using go get -u go.coder.com/sshcode
, and go to run it, and it fails with the below error:
sshcode [email protected]
2019-05-02 11:13:06 INFO ensuring code-server is updated...
2019-05-02 11:13:06 FATAL error: failed to parse host IP: host argument is not a valid IP address
Does it only work with ip addresses?
I'm running sshcode on Ubuntu 19.04.
At least on Mac, it requires chmod +x
to run
is there a way to specify the docker image. to have one with vscode + some other utils
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.