I got a error when i'm trying to connect sftp bank...
# suitescript
g
I got a error when i'm trying to connect sftp bank server from netsuite....
Copy code
Provided host key does not match remote server's fingerprint.
please give me a solution for same.
w
It looks like your provided host key does not match remote server's. You need to obtain the servers host-key and supply that when you connect to the SFTP
v
As long as the sftp server is responding, you can use ssh-keyscan from the command line and get the key from the host. The host key starts after the key type and ends with the last character. Don't include any extra characters from the command line.
For example if you get back:
foo.example.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA5NqIf8uz25Do57PbIVvk+h2Yf9Ag+ABeOu9NYuklBwXDmLHSAnFIg67F1d4ox5jLToypLNOlQJEsXDBcmPkkGm8onsGZQJigAr4ln2Z1h5ulUAQJLS3L8O3R6AJNp8kSm3AIJapndpQiE0U8EeaXgU6NYD503CzIucjwSHIUhjzqEPDUArEDNn7UhT8m3uqlPyuA3t5Yj9USGeIjAvRtjm55/uvWXdtNF9xnz5M51n/6nZqipEy3mDO1uG/mZrnjSw05UnRqIqZKahBSJrX1gPdsOvGFGD11PYdK3L9zwRsHDzRFhdbMgih3aBmp7WQXRnh3l96gTGEBPee4u0hEmQ==
Then the key begins with AAA and ends with Q==
Alternatively, if the server is not public-responding then you might need to get the key from the SFTP owners directly.
g
ya i got a same key like your example....but still i got same error..
SFTP owners provided me a key but it's not working....
v
does it respond publicly with an ssh-keyscan exec?
g
i have no idea about that....can you give me any suggestions?
v
assuming you are on Windows? open a command prompt and type ssh-keyscan.
if it runs something, then you can try this; if it tells you command not found, then you might have to use another route.
g
ok i will do
v
if the app is there then run "ssh-keyscan site.foo.com" and it will send a request on port 22, where most sftp servers are.
(replace with your target server)
g
usage: ssh-keyscan [-46cDHv] [-f file] [-p port] [-T timeout] [-t type] [host | addrlist namelist]
i got this type of message
v
good. now if your server is using port 22, then run ssh-keyscan + the name of your target host and see if anything comes back.
g
# mftprd.svb.com:22 SSH-2.0-Access to this site is logged!
after i putting target host
i got this message
v
Okay they are not responding publicly with keys. Is it possible you've selected the wrong key type? there are: rsa, dsa, and ecdsa (I think). they should have told you what key type to use. rsa is most common.
g
yes i provided RSA key type for host key
v
The only other thing I can think of is some extra chars were added or taken out of what they provided you.
You should be able to use a tool such as FileZilla or PuTTY to connect and verify the details.
Or at least to tell them that what they provided does not work.
g
ok varonaPTX, thanks for help...you provided me such a informative details.
v
you're welcome.
👍 1