Can Python package fsspec read SSH config?

495 Views Asked by At

I would like to access remote SSH server files within Python, and found fsspec. However, there seems to be few code usage examples.

In particular, I can connect by specifying all SSH config options in the function as: fsspec.filesystem('sftp', host='XXX.XXX.XXX.XXX', port=XXX, username='XXX', password='XXX') However, I would like to connect simply as fsspec.filesystem('sftp', host='nickname') as I would do as sftp nickname on console, where I have already set all the config options in .ssh/config. This is both for convenience and the fact that I do not want to parse my password in plain text.

I have read the API documentation (https://filesystem-spec.readthedocs.io/en/latest/api.html) and searched a bit but could not find a way yet. May I ask if anyone can point me some direction?

Many thanks!

0

There are 0 best solutions below