Causes and countermeasures when
Permission denied (public key) is said when trying to throw a file from Teraterm on Windows from the remote side to the client side with
Permission Denied means that the server is denying the connection for some reason. There seems to be a problem with the public key. However, there seem to be various causes for this error.
In the first place, Windows OS itself does not have an SCP client like Linux with the same settings, so it seems that it can be handled by using Teraterm's SCP client separately as described above. It seems that the authentication information used when logging in is used as it is.
However, since it seems that there is an OpenSSH client in Windows 10, it is possible to set the Windows standard SSH client, but there is a possibility that it can still be done (I have not tried) The setting method is easy to understand by @ szly, so the following Described in
Although it can be used for sending a normal text file, I made an authentication key for the client with EasyRSA etc., so when I try to send it to the client, Teraterm's file sending function does not work.
Looking at the status of the file you want to send with
ls -l, it seems that the authority is root.
-rw------- 1 root root 1696 Jan 27 11:38 authorization.pem
You can send it by changing the authority or administrator so that it can be used even with the authority of the user who logged in with SSH first. Specifically, the permission (authority) is changed with
chmod, and the administrator is changed with
Let's think about how to deal with the above case. Since root has both user groups, you can call it by setting chmod so that other users can read it.
Refer to the vote below and give 4 to the authority for other users.
|symbol||Numerical value||Corresponding authority|
sudo chmod 604 authorization.pem
It is now available for download.
chown is a command to change the owning user group.
login-user: login-user, you can specify users, groups, and so on.
This time I will change both.
sudo chown login-user:login-user authorization.pem
After this, if you send with Teraterm, you can send successfully.