SSH - Permission denied (publickey) for created user [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 5 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I can ssh to a digitalocean server using:
ssh root#1.1.1.1 (with the correct IP address)
however, after adding a user:
adduser git
...
is this information correct?
Y
...
I am not able to SSH with this new user
ssh git#1.1.1.1
Permission denied (publickey).
Why is my public key correct for root but not for git?
Update
If it matters, I am using digitalocean.

I know the problem, what your facing, you need to check the privilege of your key.
Change the user right permission. I do had an identifical problem, I can able to clone git via https not via ssh.
chmod utility will solve your issue:
This command will solve your problem.
chmod 777 <id_rsa_key(file)>
Some other frequently used examples are:
777 anyone can do anything (read, write, or execute)
755 you can do anything; others can only read and execute
711 you can do anything; others can only execute
644 you can read and write; others can only read

Related

What are the correct folder permissions for Tomcat folders? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 3 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
In my Amazon Linux instance, I had to grant bin and libs tomcat folders the permission 777 via chmod 777 foldername. But now I need to revert them back. What are the correct permission commands to make them as they were?
Refer to "Security Considerations" chapter in Tomcat Documentation (the link is for Tomcat 9.0). Definitely not world-writable. Usually not world-readable (especially the conf and logs directories). The rest depends on your requirements.
E.g. it may be 750 for all directories except the conf one and 700 for conf.

Tail command without permission in Linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 4 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
When I try to use 'tail' command in a cloud server, I'm get a permission denied error:
$ ssh myUser#server
:~$ tail /var/log/syslog
tail: cannot open ‘/var/log/syslog’ for reading: Permission denied
How to get permission in tail command?
The file you are trying to read has permissions that disallow reading by any users that aren't part of the admin group.
Option 1: Run the tail command with the sudo command which escalates your access to root for the command that follows.
example
sudo tail /var/log/syslog
Option 2: Add your user to the admin group so that you don't have to sudo each time you want to read the syslog file.

SSH refuses connection on CentOS after changing permissions on /etc [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 6 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I'm really a newbie in the Linux World. I've made change on a CentOS 5.4 server with this command :
sudo chmod -R ugo+rw /etc
Now when I try to connect with Putty from a Windows computer, I get this error :
server unexpectedly closed network connection
I assume the SSH service is running because I've currently another SSH session, that was open before the change, that is already alive. (connected as root)
Thanks in advance for any help.
Best regards,
Guy
It is /var/log/secure where you should see the errors.
The files in /etc/ssh/ can't be writable by the others. And some of them can't be even readable by others (private keys). Fix it such as:
chmod 600 /etc/ssh/ssh_host_*_key
chmod 644 /etc/ssh/ssh_host_*_key.pub /etc/ssh/ssh_config /etc/ssh/moduli
chmod 600 /etc/ssh/sshd_config
You just broke system-wide permissions and you're not allowed to login from security reasons. Try checking logs from /var/log/messages and /var/log/auth.log
grep 'sshd' /var/log/auth.log
You won't fix it easily.

Not login to system due to changing permission [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I am using Linux system but by mistake I fired a chmod command as follows:-
chmod -R 777 /
after that I restart my System. But when I try to login, the system is login but after 2-3 seconds again to login window. Please help me to solve this problem.
Just get your important files and configs backup them. format the partition which the OS installed, then reinstall again, sorry there is no easy way to correct these permissions.

How are all files and directories created as root:root in smb mount ( RHEL)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
We have smb mount point in one of our RHEL server. By logging as normal user, any file or directory created by the user is shown as root:root. What configuration has been made to force user and group shown as root:root always ? I have checked /etc/samba/smb.conf, no configuration has been found. And also all file and directory getting created by normal user has full 777 permission. Appreciate any quickest help.
The userid/gid "owning" a particular mounted SMB partition are determined by its mounting configuration.
You may want to check this Q&A: https://unix.stackexchange.com/questions/68079/mount-cifs-network-drive-write-permissions-and-chown

Resources