Hi,
One of my usernames logs out immediately after login. When logging in through .ssh I get an error saying Permission denied (publickey,password). When logging in through the console I am immediately logged out.
All the other usernames, including root, are working fine.
How can I fix this issue?
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Wow, that worked immediately. I had searched the net for days, but in the future I’ll ask here immediately.
Thank you
I faced a similar situation. When I successfully log on to the server, the server closes my login session. ssh does not work, you can only use the recovery console. This situation started when I deleted the shell package that named Fish.
~/../mnt/etcIt sounds to me like this user may have an invalid shell set. When you log into Linux on the command line it will execute the assigned shell for that user and that is where your session occurs. When you type exit it closes the shell and your connection terminates. If you have an invalid shell set, your droplet will attempt to start what is defined, find it cannot and exit.
You can ensure the correct shell is set for the user by running the following as root:
usermod --shell /bin/bash your_username
for bash or
usermod --shell /bin/sh your_username
for sh.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.