I am using ssh library (install.packages("ssh")) for R on Mac to connect to a server for file transfer (sftp). My server supports only ssh-rsa certificates.
First problem I got was key exchange error:
kex error : no match for method server host key algo: server [ssh-rsa], client [ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256]
I successfully circumvented this by adding certain parameters to /etc/ssh/ssh_config:
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,ssh-rsa MACs hmac-md5,hmac-sha1,[email protected],ssh-rsa KexAlgorithms ssh-rsa HostkeyAlgorithms ssh-rsa
connection string I use:
ssh::ssh_connect("username@ip:port", keyfile ="Key/key", verbose = "1")
Now I'am facing next error issue:
ssh_userauth_publickey: The key algorithm 'ssh-rsa' is not allowed to be used by PUBLICKEY_ACCEPTED_TYPES configuration option
Brief search shows that the problem is in underlying libssh library default parameter that does not allow ssh-rsa. But I don't see any possibility to set this parameter by using any function from R ssh:: library.
Are there any other ways how I can explicitly add ssh-rsa to PUBLICKEY_ACCEPTED_TYPES parameter of libssh from R or zsh?