SSH settings

You can index files remotely using SSH/SFTP.

Here is a list of SSH settings:

Name

Environment Variable

Default value

Documentation

fs.provider

FSCRAWLER_FS_PROVIDER

"local"

Set it to "ssh" for SSH crawling

server.hostname

FSCRAWLER_SERVER_HOSTNAME

null

Hostname

server.port

FSCRAWLER_SERVER_PORT

22

Port

server.username

FSCRAWLER_SERVER_USERNAME

null

Username / Password

server.password

FSCRAWLER_SERVER_PASSWORD

null

Username / Password

server.pem_path

FSCRAWLER_SERVER_PEM_PATH

null

Using Username / PEM file

Deprecated since version 2.10: The server.protocol setting is deprecated. Use fs.provider instead.

Username / Password

Let’s say you want to index from a remote server using SSH:

  • FS URL: /path/to/data/dir/on/server

  • Server: mynode.mydomain.com

  • Username: username

  • Password: password

  • Provider: ssh

  • Port: 22 (default to 22)

name: "test"
fs:
  provider: "ssh"
  url: "/path/to/data/dir/on/server"
server:
  hostname: "mynode.mydomain.com"
  port: 22
  username: "username"
  password: "password"

Using Username / PEM file

Let’s say you want to index from a remote server using SSH with a PEM key file:

  • FS URL: /path/to/data/dir/on/server

  • Server: mynode.mydomain.com

  • Username: username

  • PEM File: /path/to/private_key.pem

  • Provider: ssh

  • Port: 22 (default to 22)

name: "test"
fs:
  provider: "ssh"
  url: "/path/to/data/dir/on/server"
server:
  hostname: "mynode.mydomain.com"
  port: 22
  username: "username"
  pem_path: "/path/to/private_key.pem"

Windows drives

When using Windows, you might want to index documents coming from another drive than C:. To specify the drive, you need to use the following format:

name: "test"
fs:
  provider: "ssh"
  url: "/D:/path/to/data/dir/on/server"
server:
  hostname: "mynode.mydomain.com"
  port: 22
  username: "username"
  password: "password"