WinSCP SSH error Unknown command 'ssh-rsa'Enabling text file logging for WinSCP scriptHow to use SSH to run a shell script on a remote machine?How to specify the private SSH-key to use when executing shell command on Git?Trying to SSH into an Amazon Ec2 instance - permission errorssh “permissions are too open” errorHow to download a file from server using SSH?How do I find my RSA key fingerprint?SSIS Package for WinSCP fails with error code 3 but works via command prompt and on other serversGetting “Received too large SFTP packet” when logging in with Root using WinSCP to Google Compute Engine virtual machine instanceWinSCP SFTP connection errorpsftp says “The server's host key is not cached in the registry”
Is this saw blade faulty?
How to test the sharpness of a knife?
Travelling in US for more than 90 days
Highest stage count that are used one right after the other?
Can creatures abilities target that creature itself?
What is the tangent at a sharp point on a curve?
Derivative of an interpolated function
What is the meaning of "You've never met a graph you didn't like?"
Recursively move files within sub directories
Can you take a "free object interaction" while incapacitated?
Started in 1987 vs. Starting in 1987
How do you justify more code being written by following clean code practices?
Asserting that Atheism and Theism are both faith based positions
Does capillary rise violate hydrostatic paradox?
Why do Radio Buttons not fill the entire outer circle?
Center page as a whole without centering each element individually
Most common words in spoken english
Sort with assumptions
Why is implicit conversion not ambiguous for non-primitive types?
What do the positive and negative (+/-) transmit and receive pins mean on Ethernet cables?
How can I, as DM, avoid the Conga Line of Death occurring when implementing some form of flanking rule?
What is this high flying aircraft over Pennsylvania?
Is there a distance limit for minecart tracks?
How do I lift the insulation blower into the attic?
WinSCP SSH error Unknown command 'ssh-rsa'
Enabling text file logging for WinSCP scriptHow to use SSH to run a shell script on a remote machine?How to specify the private SSH-key to use when executing shell command on Git?Trying to SSH into an Amazon Ec2 instance - permission errorssh “permissions are too open” errorHow to download a file from server using SSH?How do I find my RSA key fingerprint?SSIS Package for WinSCP fails with error code 3 but works via command prompt and on other serversGetting “Received too large SFTP packet” when logging in with Root using WinSCP to Google Compute Engine virtual machine instanceWinSCP SFTP connection errorpsftp says “The server's host key is not cached in the registry”
Context: I have CSV files I'm outputting from SQL Server through BCP. I'm trying to securely transfer the files to a remote SFTP folder using WinSCP.
Details: When I execute the batch file below through powershell I raise an error 'Unknown command 'ssh-rsa' with the log file showing an exit code = 1 which is failure.
Here is what my synchronization file looks like...
option batch abort
option confirm off
open sftp://username:password@sftp.redacted.com -hostkey="ssh-rsa 2048 redacted=ssh-rsa 2048 redacted"
synchronize remote D:redactedDaily_Reportsredacted_Catalog_New_Item /upload/redacted_catalog
exit
and & my batch file...
winscp.com /script=SyncTo_redacted_catalog.txt /log=D:redacted_Daily_Reportswinscp_log_catalog.txt
pause
Here is a snippet of my powershell output and log file...
powershell output
. 2019-03-06 23:39:28.379 Access granted
. 2019-03-06 23:39:28.379 Opening session as main channel
. 2019-03-06 23:39:28.447 Opened main channel
. 2019-03-06 23:39:28.583 Started a shell/command
. 2019-03-06 23:39:28.583 --------------------------------------------------------------------------
. 2019-03-06 23:39:28.584 Using SFTP protocol.
. 2019-03-06 23:39:28.584 Doing startup conversation with host.
> 2019-03-06 23:39:28.584 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2019-03-06 23:39:28.769 Type: SSH_FXP_VERSION, Size: 95, Number: -1
. 2019-03-06 23:39:28.769 SFTP version 3 negotiated.
. 2019-03-06 23:39:28.769 Unknown server extension posix-rename@openssh.com="1"
. 2019-03-06 23:39:28.769 Supports statvfs@openssh.com extension version "2"
. 2019-03-06 23:39:28.769 Unknown server extension fstatvfs@openssh.com="2"
. 2019-03-06 23:39:28.769 We believe the server has signed timestamps bug
. 2019-03-06 23:39:28.769 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 strings are not mandatory
. 2019-03-06 23:39:28.769 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2019-03-06 23:39:28.769 Getting current directory name.
. 2019-03-06 23:39:28.769 Getting real path for '.'
> 2019-03-06 23:39:28.769 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2019-03-06 23:39:28.837 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2019-03-06 23:39:28.837 Real path is '/'
. 2019-03-06 23:39:28.837 Startup conversation with host finished.
< 2019-03-06 23:39:28.837 Script: Active session: [1] redacted@sftp.redacted.com
> 2019-03-06 23:39:28.838 Script: ssh-rsa 2048 redacted
< 2019-03-06 23:39:28.838 Script: Unknown command 'ssh-rsa'.
. 2019-03-06 23:39:28.838 Script: Failed
. 2019-03-06 23:39:28.838 Script: Exit code: 1
. 2019-03-06 23:39:28.838 Closing connection.
. 2019-03-06 23:39:28.838 Sending special code: 12
. 2019-03-06 23:39:28.838 Sent EOF message
Questions:
Why am I raising this error & how do I fix it?
Is this error trying to tell me that I'm using an incorrect key-fingerprint -- If so, why is that the case when a) I obtained this key directly from the server when I connected successfully the first time and b) the log file appears to show the initial connection was successful?
Please help Any tips or recommendations greatly appreciated -- responses will probably reach a decent sized audience given that winscp is a pretty popular utility. I've done my research here, here, here, here, here, here and here & haven't found a suitable solution.
powershell ssh sftp file-transfer winscp
add a comment |
Context: I have CSV files I'm outputting from SQL Server through BCP. I'm trying to securely transfer the files to a remote SFTP folder using WinSCP.
Details: When I execute the batch file below through powershell I raise an error 'Unknown command 'ssh-rsa' with the log file showing an exit code = 1 which is failure.
Here is what my synchronization file looks like...
option batch abort
option confirm off
open sftp://username:password@sftp.redacted.com -hostkey="ssh-rsa 2048 redacted=ssh-rsa 2048 redacted"
synchronize remote D:redactedDaily_Reportsredacted_Catalog_New_Item /upload/redacted_catalog
exit
and & my batch file...
winscp.com /script=SyncTo_redacted_catalog.txt /log=D:redacted_Daily_Reportswinscp_log_catalog.txt
pause
Here is a snippet of my powershell output and log file...
powershell output
. 2019-03-06 23:39:28.379 Access granted
. 2019-03-06 23:39:28.379 Opening session as main channel
. 2019-03-06 23:39:28.447 Opened main channel
. 2019-03-06 23:39:28.583 Started a shell/command
. 2019-03-06 23:39:28.583 --------------------------------------------------------------------------
. 2019-03-06 23:39:28.584 Using SFTP protocol.
. 2019-03-06 23:39:28.584 Doing startup conversation with host.
> 2019-03-06 23:39:28.584 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2019-03-06 23:39:28.769 Type: SSH_FXP_VERSION, Size: 95, Number: -1
. 2019-03-06 23:39:28.769 SFTP version 3 negotiated.
. 2019-03-06 23:39:28.769 Unknown server extension posix-rename@openssh.com="1"
. 2019-03-06 23:39:28.769 Supports statvfs@openssh.com extension version "2"
. 2019-03-06 23:39:28.769 Unknown server extension fstatvfs@openssh.com="2"
. 2019-03-06 23:39:28.769 We believe the server has signed timestamps bug
. 2019-03-06 23:39:28.769 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 strings are not mandatory
. 2019-03-06 23:39:28.769 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2019-03-06 23:39:28.769 Getting current directory name.
. 2019-03-06 23:39:28.769 Getting real path for '.'
> 2019-03-06 23:39:28.769 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2019-03-06 23:39:28.837 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2019-03-06 23:39:28.837 Real path is '/'
. 2019-03-06 23:39:28.837 Startup conversation with host finished.
< 2019-03-06 23:39:28.837 Script: Active session: [1] redacted@sftp.redacted.com
> 2019-03-06 23:39:28.838 Script: ssh-rsa 2048 redacted
< 2019-03-06 23:39:28.838 Script: Unknown command 'ssh-rsa'.
. 2019-03-06 23:39:28.838 Script: Failed
. 2019-03-06 23:39:28.838 Script: Exit code: 1
. 2019-03-06 23:39:28.838 Closing connection.
. 2019-03-06 23:39:28.838 Sending special code: 12
. 2019-03-06 23:39:28.838 Sent EOF message
Questions:
Why am I raising this error & how do I fix it?
Is this error trying to tell me that I'm using an incorrect key-fingerprint -- If so, why is that the case when a) I obtained this key directly from the server when I connected successfully the first time and b) the log file appears to show the initial connection was successful?
Please help Any tips or recommendations greatly appreciated -- responses will probably reach a decent sized audience given that winscp is a pretty popular utility. I've done my research here, here, here, here, here, here and here & haven't found a suitable solution.
powershell ssh sftp file-transfer winscp
add a comment |
Context: I have CSV files I'm outputting from SQL Server through BCP. I'm trying to securely transfer the files to a remote SFTP folder using WinSCP.
Details: When I execute the batch file below through powershell I raise an error 'Unknown command 'ssh-rsa' with the log file showing an exit code = 1 which is failure.
Here is what my synchronization file looks like...
option batch abort
option confirm off
open sftp://username:password@sftp.redacted.com -hostkey="ssh-rsa 2048 redacted=ssh-rsa 2048 redacted"
synchronize remote D:redactedDaily_Reportsredacted_Catalog_New_Item /upload/redacted_catalog
exit
and & my batch file...
winscp.com /script=SyncTo_redacted_catalog.txt /log=D:redacted_Daily_Reportswinscp_log_catalog.txt
pause
Here is a snippet of my powershell output and log file...
powershell output
. 2019-03-06 23:39:28.379 Access granted
. 2019-03-06 23:39:28.379 Opening session as main channel
. 2019-03-06 23:39:28.447 Opened main channel
. 2019-03-06 23:39:28.583 Started a shell/command
. 2019-03-06 23:39:28.583 --------------------------------------------------------------------------
. 2019-03-06 23:39:28.584 Using SFTP protocol.
. 2019-03-06 23:39:28.584 Doing startup conversation with host.
> 2019-03-06 23:39:28.584 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2019-03-06 23:39:28.769 Type: SSH_FXP_VERSION, Size: 95, Number: -1
. 2019-03-06 23:39:28.769 SFTP version 3 negotiated.
. 2019-03-06 23:39:28.769 Unknown server extension posix-rename@openssh.com="1"
. 2019-03-06 23:39:28.769 Supports statvfs@openssh.com extension version "2"
. 2019-03-06 23:39:28.769 Unknown server extension fstatvfs@openssh.com="2"
. 2019-03-06 23:39:28.769 We believe the server has signed timestamps bug
. 2019-03-06 23:39:28.769 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 strings are not mandatory
. 2019-03-06 23:39:28.769 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2019-03-06 23:39:28.769 Getting current directory name.
. 2019-03-06 23:39:28.769 Getting real path for '.'
> 2019-03-06 23:39:28.769 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2019-03-06 23:39:28.837 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2019-03-06 23:39:28.837 Real path is '/'
. 2019-03-06 23:39:28.837 Startup conversation with host finished.
< 2019-03-06 23:39:28.837 Script: Active session: [1] redacted@sftp.redacted.com
> 2019-03-06 23:39:28.838 Script: ssh-rsa 2048 redacted
< 2019-03-06 23:39:28.838 Script: Unknown command 'ssh-rsa'.
. 2019-03-06 23:39:28.838 Script: Failed
. 2019-03-06 23:39:28.838 Script: Exit code: 1
. 2019-03-06 23:39:28.838 Closing connection.
. 2019-03-06 23:39:28.838 Sending special code: 12
. 2019-03-06 23:39:28.838 Sent EOF message
Questions:
Why am I raising this error & how do I fix it?
Is this error trying to tell me that I'm using an incorrect key-fingerprint -- If so, why is that the case when a) I obtained this key directly from the server when I connected successfully the first time and b) the log file appears to show the initial connection was successful?
Please help Any tips or recommendations greatly appreciated -- responses will probably reach a decent sized audience given that winscp is a pretty popular utility. I've done my research here, here, here, here, here, here and here & haven't found a suitable solution.
powershell ssh sftp file-transfer winscp
Context: I have CSV files I'm outputting from SQL Server through BCP. I'm trying to securely transfer the files to a remote SFTP folder using WinSCP.
Details: When I execute the batch file below through powershell I raise an error 'Unknown command 'ssh-rsa' with the log file showing an exit code = 1 which is failure.
Here is what my synchronization file looks like...
option batch abort
option confirm off
open sftp://username:password@sftp.redacted.com -hostkey="ssh-rsa 2048 redacted=ssh-rsa 2048 redacted"
synchronize remote D:redactedDaily_Reportsredacted_Catalog_New_Item /upload/redacted_catalog
exit
and & my batch file...
winscp.com /script=SyncTo_redacted_catalog.txt /log=D:redacted_Daily_Reportswinscp_log_catalog.txt
pause
Here is a snippet of my powershell output and log file...
powershell output
. 2019-03-06 23:39:28.379 Access granted
. 2019-03-06 23:39:28.379 Opening session as main channel
. 2019-03-06 23:39:28.447 Opened main channel
. 2019-03-06 23:39:28.583 Started a shell/command
. 2019-03-06 23:39:28.583 --------------------------------------------------------------------------
. 2019-03-06 23:39:28.584 Using SFTP protocol.
. 2019-03-06 23:39:28.584 Doing startup conversation with host.
> 2019-03-06 23:39:28.584 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2019-03-06 23:39:28.769 Type: SSH_FXP_VERSION, Size: 95, Number: -1
. 2019-03-06 23:39:28.769 SFTP version 3 negotiated.
. 2019-03-06 23:39:28.769 Unknown server extension posix-rename@openssh.com="1"
. 2019-03-06 23:39:28.769 Supports statvfs@openssh.com extension version "2"
. 2019-03-06 23:39:28.769 Unknown server extension fstatvfs@openssh.com="2"
. 2019-03-06 23:39:28.769 We believe the server has signed timestamps bug
. 2019-03-06 23:39:28.769 We will use UTF-8 strings until server sends an invalid UTF-8 string as with SFTP version 3 and older UTF-8 strings are not mandatory
. 2019-03-06 23:39:28.769 Limiting packet size to OpenSSH sftp-server limit of 262148 bytes
. 2019-03-06 23:39:28.769 Getting current directory name.
. 2019-03-06 23:39:28.769 Getting real path for '.'
> 2019-03-06 23:39:28.769 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2019-03-06 23:39:28.837 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2019-03-06 23:39:28.837 Real path is '/'
. 2019-03-06 23:39:28.837 Startup conversation with host finished.
< 2019-03-06 23:39:28.837 Script: Active session: [1] redacted@sftp.redacted.com
> 2019-03-06 23:39:28.838 Script: ssh-rsa 2048 redacted
< 2019-03-06 23:39:28.838 Script: Unknown command 'ssh-rsa'.
. 2019-03-06 23:39:28.838 Script: Failed
. 2019-03-06 23:39:28.838 Script: Exit code: 1
. 2019-03-06 23:39:28.838 Closing connection.
. 2019-03-06 23:39:28.838 Sending special code: 12
. 2019-03-06 23:39:28.838 Sent EOF message
Questions:
Why am I raising this error & how do I fix it?
Is this error trying to tell me that I'm using an incorrect key-fingerprint -- If so, why is that the case when a) I obtained this key directly from the server when I connected successfully the first time and b) the log file appears to show the initial connection was successful?
Please help Any tips or recommendations greatly appreciated -- responses will probably reach a decent sized audience given that winscp is a pretty popular utility. I've done my research here, here, here, here, here, here and here & haven't found a suitable solution.
powershell ssh sftp file-transfer winscp
powershell ssh sftp file-transfer winscp
edited 2 days ago
jww
53.9k40232508
53.9k40232508
asked Mar 7 at 0:38
emalcolmbemalcolmb
238
238
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
This is nonsense:-hostkey="ssh-rsa 2048 redacted=ssh-rsa 2048 redacted"
(where have you seen such a strange syntax?)
It should be like:-hostkey="sha-rsa 2048 xx:xx:xx:xx:xx"
Though it does not really explain the error message you are getting – unless there are some special characters (like double quotes) in the redacted
part.
In general, the easiest way is to have WinSCP GUI generate correct script template for you.
Or, if you want to go a manual way, see:
Where do I get SSH host key fingerprint to authorize the server?
Particularly the section "Automatic host key verification" (though you will want to read the article from the beginning).
I'm aware that you refer to this article yourself. But then I do not understand how you could have arrived to your strange syntax.
Hi Martin. Thank you for the response. I apologize if my my host key is "nonsense" to you.....As noted in my question when I copied the host key that is what it looked like, only I redacted parts in the post here for privacy...I've tried several variations including the one you recommended and I'm still raising that error. I'll try using the GUI & see if that helps.
– emalcolmb
Mar 7 at 14:30
Where exactly did you copy the host key (in that format) from?
– Martin Prikryl
Mar 7 at 14:38
"I've tried several variations including the one you recommended and I'm still raising that error" - Show us a complete log file for that. -- Note that a fingerprint of a public host key is a public information - no need to "redact" it - you only make it complicated for us to help you by doing so.
– Martin Prikryl
Mar 7 at 14:40
From the dialog box that's prompted on connection, looks similar to this for example, only when I hit copy key "Copy Key" this is the string I got:ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
– emalcolmb
Mar 7 at 18:07
Are you sure? Don't you actually get two lines into the clipboard? 1)ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=
and 2)ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
?
– Martin Prikryl
Mar 7 at 19:25
|
show 4 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55034351%2fwinscp-ssh-error-unknown-command-ssh-rsa%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is nonsense:-hostkey="ssh-rsa 2048 redacted=ssh-rsa 2048 redacted"
(where have you seen such a strange syntax?)
It should be like:-hostkey="sha-rsa 2048 xx:xx:xx:xx:xx"
Though it does not really explain the error message you are getting – unless there are some special characters (like double quotes) in the redacted
part.
In general, the easiest way is to have WinSCP GUI generate correct script template for you.
Or, if you want to go a manual way, see:
Where do I get SSH host key fingerprint to authorize the server?
Particularly the section "Automatic host key verification" (though you will want to read the article from the beginning).
I'm aware that you refer to this article yourself. But then I do not understand how you could have arrived to your strange syntax.
Hi Martin. Thank you for the response. I apologize if my my host key is "nonsense" to you.....As noted in my question when I copied the host key that is what it looked like, only I redacted parts in the post here for privacy...I've tried several variations including the one you recommended and I'm still raising that error. I'll try using the GUI & see if that helps.
– emalcolmb
Mar 7 at 14:30
Where exactly did you copy the host key (in that format) from?
– Martin Prikryl
Mar 7 at 14:38
"I've tried several variations including the one you recommended and I'm still raising that error" - Show us a complete log file for that. -- Note that a fingerprint of a public host key is a public information - no need to "redact" it - you only make it complicated for us to help you by doing so.
– Martin Prikryl
Mar 7 at 14:40
From the dialog box that's prompted on connection, looks similar to this for example, only when I hit copy key "Copy Key" this is the string I got:ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
– emalcolmb
Mar 7 at 18:07
Are you sure? Don't you actually get two lines into the clipboard? 1)ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=
and 2)ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
?
– Martin Prikryl
Mar 7 at 19:25
|
show 4 more comments
This is nonsense:-hostkey="ssh-rsa 2048 redacted=ssh-rsa 2048 redacted"
(where have you seen such a strange syntax?)
It should be like:-hostkey="sha-rsa 2048 xx:xx:xx:xx:xx"
Though it does not really explain the error message you are getting – unless there are some special characters (like double quotes) in the redacted
part.
In general, the easiest way is to have WinSCP GUI generate correct script template for you.
Or, if you want to go a manual way, see:
Where do I get SSH host key fingerprint to authorize the server?
Particularly the section "Automatic host key verification" (though you will want to read the article from the beginning).
I'm aware that you refer to this article yourself. But then I do not understand how you could have arrived to your strange syntax.
Hi Martin. Thank you for the response. I apologize if my my host key is "nonsense" to you.....As noted in my question when I copied the host key that is what it looked like, only I redacted parts in the post here for privacy...I've tried several variations including the one you recommended and I'm still raising that error. I'll try using the GUI & see if that helps.
– emalcolmb
Mar 7 at 14:30
Where exactly did you copy the host key (in that format) from?
– Martin Prikryl
Mar 7 at 14:38
"I've tried several variations including the one you recommended and I'm still raising that error" - Show us a complete log file for that. -- Note that a fingerprint of a public host key is a public information - no need to "redact" it - you only make it complicated for us to help you by doing so.
– Martin Prikryl
Mar 7 at 14:40
From the dialog box that's prompted on connection, looks similar to this for example, only when I hit copy key "Copy Key" this is the string I got:ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
– emalcolmb
Mar 7 at 18:07
Are you sure? Don't you actually get two lines into the clipboard? 1)ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=
and 2)ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
?
– Martin Prikryl
Mar 7 at 19:25
|
show 4 more comments
This is nonsense:-hostkey="ssh-rsa 2048 redacted=ssh-rsa 2048 redacted"
(where have you seen such a strange syntax?)
It should be like:-hostkey="sha-rsa 2048 xx:xx:xx:xx:xx"
Though it does not really explain the error message you are getting – unless there are some special characters (like double quotes) in the redacted
part.
In general, the easiest way is to have WinSCP GUI generate correct script template for you.
Or, if you want to go a manual way, see:
Where do I get SSH host key fingerprint to authorize the server?
Particularly the section "Automatic host key verification" (though you will want to read the article from the beginning).
I'm aware that you refer to this article yourself. But then I do not understand how you could have arrived to your strange syntax.
This is nonsense:-hostkey="ssh-rsa 2048 redacted=ssh-rsa 2048 redacted"
(where have you seen such a strange syntax?)
It should be like:-hostkey="sha-rsa 2048 xx:xx:xx:xx:xx"
Though it does not really explain the error message you are getting – unless there are some special characters (like double quotes) in the redacted
part.
In general, the easiest way is to have WinSCP GUI generate correct script template for you.
Or, if you want to go a manual way, see:
Where do I get SSH host key fingerprint to authorize the server?
Particularly the section "Automatic host key verification" (though you will want to read the article from the beginning).
I'm aware that you refer to this article yourself. But then I do not understand how you could have arrived to your strange syntax.
answered Mar 7 at 10:51
Martin PrikrylMartin Prikryl
90.3k22179384
90.3k22179384
Hi Martin. Thank you for the response. I apologize if my my host key is "nonsense" to you.....As noted in my question when I copied the host key that is what it looked like, only I redacted parts in the post here for privacy...I've tried several variations including the one you recommended and I'm still raising that error. I'll try using the GUI & see if that helps.
– emalcolmb
Mar 7 at 14:30
Where exactly did you copy the host key (in that format) from?
– Martin Prikryl
Mar 7 at 14:38
"I've tried several variations including the one you recommended and I'm still raising that error" - Show us a complete log file for that. -- Note that a fingerprint of a public host key is a public information - no need to "redact" it - you only make it complicated for us to help you by doing so.
– Martin Prikryl
Mar 7 at 14:40
From the dialog box that's prompted on connection, looks similar to this for example, only when I hit copy key "Copy Key" this is the string I got:ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
– emalcolmb
Mar 7 at 18:07
Are you sure? Don't you actually get two lines into the clipboard? 1)ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=
and 2)ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
?
– Martin Prikryl
Mar 7 at 19:25
|
show 4 more comments
Hi Martin. Thank you for the response. I apologize if my my host key is "nonsense" to you.....As noted in my question when I copied the host key that is what it looked like, only I redacted parts in the post here for privacy...I've tried several variations including the one you recommended and I'm still raising that error. I'll try using the GUI & see if that helps.
– emalcolmb
Mar 7 at 14:30
Where exactly did you copy the host key (in that format) from?
– Martin Prikryl
Mar 7 at 14:38
"I've tried several variations including the one you recommended and I'm still raising that error" - Show us a complete log file for that. -- Note that a fingerprint of a public host key is a public information - no need to "redact" it - you only make it complicated for us to help you by doing so.
– Martin Prikryl
Mar 7 at 14:40
From the dialog box that's prompted on connection, looks similar to this for example, only when I hit copy key "Copy Key" this is the string I got:ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
– emalcolmb
Mar 7 at 18:07
Are you sure? Don't you actually get two lines into the clipboard? 1)ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=
and 2)ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
?
– Martin Prikryl
Mar 7 at 19:25
Hi Martin. Thank you for the response. I apologize if my my host key is "nonsense" to you.....As noted in my question when I copied the host key that is what it looked like, only I redacted parts in the post here for privacy...I've tried several variations including the one you recommended and I'm still raising that error. I'll try using the GUI & see if that helps.
– emalcolmb
Mar 7 at 14:30
Hi Martin. Thank you for the response. I apologize if my my host key is "nonsense" to you.....As noted in my question when I copied the host key that is what it looked like, only I redacted parts in the post here for privacy...I've tried several variations including the one you recommended and I'm still raising that error. I'll try using the GUI & see if that helps.
– emalcolmb
Mar 7 at 14:30
Where exactly did you copy the host key (in that format) from?
– Martin Prikryl
Mar 7 at 14:38
Where exactly did you copy the host key (in that format) from?
– Martin Prikryl
Mar 7 at 14:38
"I've tried several variations including the one you recommended and I'm still raising that error" - Show us a complete log file for that. -- Note that a fingerprint of a public host key is a public information - no need to "redact" it - you only make it complicated for us to help you by doing so.
– Martin Prikryl
Mar 7 at 14:40
"I've tried several variations including the one you recommended and I'm still raising that error" - Show us a complete log file for that. -- Note that a fingerprint of a public host key is a public information - no need to "redact" it - you only make it complicated for us to help you by doing so.
– Martin Prikryl
Mar 7 at 14:40
From the dialog box that's prompted on connection, looks similar to this for example, only when I hit copy key "Copy Key" this is the string I got:
ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
– emalcolmb
Mar 7 at 18:07
From the dialog box that's prompted on connection, looks similar to this for example, only when I hit copy key "Copy Key" this is the string I got:
ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
– emalcolmb
Mar 7 at 18:07
Are you sure? Don't you actually get two lines into the clipboard? 1)
ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=
and 2) ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
?– Martin Prikryl
Mar 7 at 19:25
Are you sure? Don't you actually get two lines into the clipboard? 1)
ssh-rsa 2048 Wbe5LyFm08qfvhCX+KGULKiRl/qXp4C5/zez5Tw3zIA=
and 2) ssh-rsa 2048 ad:b3:c7:a1:ff:43:5c:71:d6:a7:50:6c:1a:c8:d1:70
?– Martin Prikryl
Mar 7 at 19:25
|
show 4 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55034351%2fwinscp-ssh-error-unknown-command-ssh-rsa%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown