# SSL peer certificate or SSH remote key was not OK

**URL:** <https://discuss.ray.io/t/ssl-peer-certificate-or-ssh-remote-key-was-not-ok/11091>\
**Category:** Uncategorized\
**Created:** [June 19, 2023, 3:14pm UTC](https://discuss.ray.io/t/ssl-peer-certificate-or-ssh-remote-key-was-not-ok/11091 "2023-06-19T15:14:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kai](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/kai/32/3380_2.png) [@kai](https://discuss.ray.io/u/kai)\
**Post date:** [June 20, 2023, 7:56am UTC](https://discuss.ray.io/t/ssl-peer-certificate-or-ssh-remote-key-was-not-ok/11091/2 "2023-06-20T07:56:25Z")

</div>

@rentom from the error logs it looks like the problem may be in pyarrow. Can you try `s3_filesystem.get_file_info(s3_path)` to see if this problem comes up with just pyarrow (without ray data)?

You may be able to circumvent this by using [fsspec/s3fs](https://github.com/fsspec/s3fs) (`pip install s3fs`) and a [pyarrow.fs.PyFileSystem](https://arrow.apache.org/docs/python/generated/pyarrow.fs.PyFileSystem.html):

```auto
from pyarrow.fs import PyFileSystem, FSSpecHandler
pa_fs = PyFileSystem(FSSpecHandler(fs)) 

```

(`fs` would be your `s3fs.S3FileSystem` instance).

Since s3fs uses boto under the hood, it should work out of the box.

---

_[View the full topic](https://discuss.ray.io/t/ssl-peer-certificate-or-ssh-remote-key-was-not-ok/11091)._
