vesoft-inc / nebula-br

Backup and restore utility for Nebula Graph
Apache License 2.0
15 stars 11 forks source link

ssh error while trying to backup data #14

Open randomJoe211 opened 3 years ago

randomJoe211 commented 3 years ago

I installed BR, configured free ssh access. When I tried to back up, it still showed the following error.

[u1@m1 ~]$ ssh yao.zhou@192.168.8.91
Last login: Mon Jul 26 09:24:29 2021 from 192.168.8.111
[u2@m2 ~]$ exit
logout
Connection to 192.168.8.91 closed.
[u1@m1 ~]$ ./nebula-br/bin/br backup full --meta "192.168.8.91:9559" --storage "local:///backup/" --user "yao.zhou" --verbose
start to backup cluster...
Error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Usage:
  br backup full [flags]

Flags:
  -h, --help   help for full

Global Flags:
      --concurrent int       max concurrent(for aliyun OSS) (default 5)
      --connection int       max ssh connection (default 5)
      --extra_args string    backup storage utils(oss/hdfs/s3) args for backup
      --log string           log path (default "br.log")
      --meta string          meta server
      --spaces stringArray   (EXPERIMENTAL)space names.
                                 By this option, user can specify which spaces to backup. Now this feature is still experimental.

      --storage string       backup target url, format: <SCHEME>://<PATH>.
                                 <SCHEME>: a string indicating which backend type. optional: local, hdfs.
                                 now hdfs and local is supported, s3 and oss are still experimental.
                                 example:
                                 for local - "local:///the/local/path/to/backup"
                                 for hdfs  - "hdfs://example_host:example_port/examplepath"
                                 (EXPERIMENTAL) for oss - "oss://example/url/to/the/backup"
                                 (EXPERIMENTAL) for s3  - "s3://example/url/to/the/backup"

      --user string          username to login into the hosts where meta/storage service located
      --verbose              show backup detailed informations

Is this an issue related to user privileges? Please take a look at it.

linkensphere201 commented 3 years ago

@randomJoe211 It designed to act like that. you should authenticate the ssh tunnel between the host of br command running at and the target host of service, for example, by 'ssh-copy-id'. pls check: prerequisites

randomJoe211 commented 3 years ago

@randomJoe211 It designed to act like that. you should authenticate the ssh tunnel between the host of br command running at and the target host of service, for example, by 'ssh-copy-id'. pls check: prerequisites

I have already done that. The code block I attached had these lines:

[u1@m1 ~]$ ssh yao.zhou@192.168.8.91
Last login: Mon Jul 26 09:24:29 2021 from 192.168.8.111
[u2@m2 ~]$ exit
logout
Connection to 192.168.8.91 closed.

You can see that password-free SSH access is already enabled.