To connect to a remote jupyter server started with --no-browser option, I usually do a local port forward and connect to the server using the web-browser. However, I would like to connect to that server using the vscode's python extension using its "Specify Jupyter server URI" option. At present, I tried passing the same url , something like http://127.0.01:8888/notebooks/some_nb.ipynb?token=asd45366778875434.adsdsgd35331, but nothing happens.
How do I connect to this server form within vscode?Any help would be appreciated.
Related
I am kind of a stuck in a situation where I want to use python script to connect to a VPN and then connect to the Mongo Client. Our company has given me a ovpn file which I connect to using OPENVPN connect client. After the VPN connection is made, I then connect to the mongo client/server with the pymongo module in python and everything works fine and i can run all the relevant scripts on the DB.
I want to ask if it is possible to NOT use the OPENVPN connect client(because this actually connects my whole internet to the VPN and that what i dont want) and somehow use the OVPN file in python script and connect to the mongo server. I heard the that we can use the subprocess module to connect using a OVPN file but dont know how.
I am on a windows computer if this information helps. I how i got the message across. Any help will be appreciated.
here is the script i wrote but it gave me a server timeout error.
import subprocess
import pymongo
subprocess.run(["openvpn", "--config", "test-vpn.ovpn" ], shell = True)
client = pymongo.MongoClient('CONNECTIONSTRING')
client.list_database_names()
I use VSCode Remote for development on an academic cluster and I am a frequent user of the Jupyter extension. On my cluster, I launch a Jupyter instance using Slurm and then use the "Connect to a Jupyter Server" option to connect to the instance. This was working well until today, when entering the URL for the Jupyter server caused the server selection interface to disappear with no error in the gui. In the Jupyter output, the following error is displayed:
info 15:49:09.478: Creating server with url : <URL>
info 15:49:09.549: Creating server with url : <URL>
error 15:49:10.417: Failed to enter Jupyter Uri, Class name = k, completed in 868ms,
has a falsy return value, Arg 1: "<URL>/?token=<TOKEN>",
Return Value: undefined [Error: UNIX[No such file or directory]]
What I have tried to debug:
Restart VSCode locally (nothing changes)
Restart the remote server (nothing changes)
Manually port forward and view the Jupyter notebook in Google Chrome (works)
Check for updates (no updates available, but this behavior might have been caused by an update)
Does anyone have any advice for how to debug the Jupyter extension to figure out what is going wrong? Thank you!
Is it possible to connect to SDF SSH machine http://sdf.org/ via VScode? I could not find any tutorial on their website.
I used to connect remote servers provided by Linode and GCP and I use Visual Studio Code via Sftp extension and all works just fine. However, with the same set of configurations, I couldn't connect to my Aws EC2 server.
The following is the sftp.json (with sensitive information changed)
And the aws security setting is as following
The strange thing is that I can ssh connect to the server on the terminal and I can use filezilla to send file with the same credential as well. But somehow I can't connect to it via Visual Studio Code sftp or SSH remote extension.
I searched the anwser on the internet and found an answer that worked for me.
The problem has to do with the Ubuntu 22.04 default server default key setting and not with the VSCode.
The solution is adding
PubkeyAcceptedKeyTypes=+ssh-rsa
in /etc/ssh/sshd_config
and then restart the service on the server with the following command
sudo systemctl restart sshd
The source of the answer comes from https://github.com/liximomo/vscode-sftp/issues/37 under the user windware-ono's answer.
I'm trying to setup Remote SSH extension on vscode to connect to a server that runs Windows Server 2022.
First, I can connect with SSH from the terminal ssh username#public_ip -p port then I enter the password and I can access the server.
I installed the Remote - SSH extension on vscode. I was able to connect to a Raspberry Pi without problems... But I cannot connect to a Windows Server 2022.
It asks me to enter the username password twice, then after a few seconds it stops with two errors pop-ups (see picture below).
Could not fetch remote environment
Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006)
errors
Also, from another machine. I can connect to my server with vscode and the same extension (Windows Server 2022) without any problems so I don't think that the server has any issues. Seems like the problem is on my computer that won't connect.
I was able to connect once but I did break something and I don't know what. I tried to reinstall the extension but nothing helped.
EDIT:
I think I fixed it.
Here's what I did.
I uninstalled the Remote - SSH extension
I opened the settings.json on my local computer and deleted everything that had to do with this extension.
Deleted the config file from C:\Users\username\.ssh\config
I restarted vscode
Installed the extension
And it worked.