2

I use a Python Jupyter Notebook to access databases on a remote server, connected via SSH (Remote-SSH Extension).

When I try pandas.read_csv() I can only access files that are on the remote server, but I want to read local files.

How can I access my local files using the Python code?

What path must I use or what command is necessary?

os.getcwd() shows only remote path

Thanks for your help! This is my very first question here.

2 Answers 2

1

Seems that what I was trying to do is not possible, according to this: https://github.com/microsoft/vscode-remote-release/issues/706

Having a mixed workspace would require that a workspace extension can be active both locally and remotely. Currently an extension can only be active once, either locally or remotely. So this is currently not possible and we have no plans to support this. The recommendation is to have separate windows open for the local and remote workspace.

Sign up to request clarification or add additional context in comments.

Comments

1

You can mount your local file system to the remote server using the steps in the given link.

https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh

After mounting, you can access the local drive using jupyter notebook using the address for the mount point. Please Note: In this case, your local machine needs to have a fixed IP.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.