meztez / plumberDeploy

Other
50 stars 12 forks source link

Error: Authentication with ssh server failed though it is in local #29

Open boral opened 3 years ago

boral commented 3 years ago

System details

Output of sessioninfo::session_info()():

> sessioninfo::session_info()
- Session info -----------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 4.0.5 (2021-03-31)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_India.1252          
 ctype    English_India.1252          
 tz       Asia/Calcutta               
 date     2021-05-18                  

- Packages ---------------------------------------------------------------------------------------------------------
 package       * version  date       lib source                               
 analogsea       0.9.4.93 2021-05-17 [1] Github (sckott/analogsea@3bf0a49)    
 askpass         1.1      2019-01-13 [1] CRAN (R 4.0.0)                       
 cli             2.5.0    2021-04-26 [1] CRAN (R 4.0.5)                       
 credentials     1.3.0    2020-07-21 [1] CRAN (R 4.0.4)                       
 curl            4.3.1    2021-04-30 [1] CRAN (R 4.0.5)                       
 generics        0.1.0    2020-10-31 [1] CRAN (R 4.0.3)                       
 httr            1.4.2    2020-07-20 [1] CRAN (R 4.0.2)                       
 jsonlite        1.7.2    2020-12-09 [1] CRAN (R 4.0.4)                       
 lubridate       1.7.10   2021-02-26 [1] CRAN (R 4.0.4)                       
 magrittr        2.0.1    2020-11-17 [1] CRAN (R 4.0.4)                       
 openssl         1.4.4    2021-04-30 [1] CRAN (R 4.0.5)                       
 plumberDeploy   0.2.1    2021-05-17 [1] Github (meztez/plumberDeploy@78c5913)
 R6              2.5.0    2020-10-28 [1] CRAN (R 4.0.4)                       
 Rcpp            1.0.6    2021-01-15 [1] CRAN (R 4.0.4)                       
 sessioninfo     1.1.1    2018-11-05 [1] CRAN (R 4.0.0)                       
 ssh             0.8.0    2021-05-03 [1] CRAN (R 4.0.5)                       
 sys             3.4      2020-07-23 [1] CRAN (R 4.0.2)                       
 tinytex         0.31     2021-03-30 [1] CRAN (R 4.0.5)                       
 withr           2.4.2    2021-04-18 [1] CRAN (R 4.0.5)                       
 xfun            0.21     2021-02-10 [1] CRAN (R 4.0.4)                       
 yaml            2.2.1    2020-02-01 [1] CRAN (R 4.0.0)                       

[1] C:/Users/user/Documents/R/win-library/4.0
[2] C:/Program Files/R/R-4.0.5/library

Example application or steps to reproduce the problem

``` r
ssh::ssh_key_info()
#> $key
#> [1] "C:\\Users\\user\\.ssh\\id_rsa"
#> 
#> $pubkey
#> [1] "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDLXwNPiQK2QZCL<hidden intentionally>"

Created on 2021-05-18 by the reprex package (v2.0.0)

$new_key
[1] "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEUjJoktL7XfYzxg<hidden intentionally>"
> id = plumberDeploy::do_provision( 'ubuntu', example = FALSE )
Error: Authentication with ssh server failed

Describe the problem in detail

Not able to do do_provision(). It is giving authentication error.

muschellij2 commented 3 years ago

Does analogsea::droplet() run for you?

boral commented 3 years ago

Yes it ran for me :

> analogsea::droplet(246486768)
<droplet>ubuntu (246486768)
  IP:        <intentionally hidden>
  Status:    active
  Region:    San Francisco 3
  Image:     20.04 (LTS) x64
  Size:      s-1vcpu-1gb
  Volumes:   
boral commented 3 years ago

@muschellij2 Any solution for this ?

meztez commented 3 years ago

@boral Once you have a droplet. Are you able to use analogsea ssh?

droplet <- analogsea::droplet(246486768)
analogsea::droplet_ssh(droplet, "whoami", verbose = TRUE)
boral commented 3 years ago

@meztez No it is still giving same error.

> droplet <- analogsea::droplet(246486768)
> analogsea::droplet_ssh(droplet, "whoami", verbose = TRUE)
whoami
Error: Authentication with ssh server failed
meztez commented 3 years ago

@boral I do not know how to help you further. I do not know if it is a firewall, if port 22 is blocked somehow. Try a different network, computer.

Are you able to establish ssh connection outside R?

sharward commented 2 years ago

I'm running into this same issue. I've spent hours trying to figure it out. It creates the droplet, but fails on the SSH. It causes the final provisioning process to fail. I went through all the SSH set up several different times trying to make it work.

meztez commented 2 years ago

@sharward I cannot reproduce on my side, hit me up on Teams at bruno@boostao.ca. Without being able to reproduce, pretty hard to fix.

sharward commented 2 years ago

@meztez I sent you a chat request in Microsoft teams.