Jump to content

Ubuntu server SSH access denied

Joveice
Go to solution Solved by Joveice,
6 hours ago, KuJoe said:

If it's a firewall issue (iptables) then changing the port won't help. Can you run this command and post the output?


netstat -tulp | grep ssh

 

Did not need to :) Solved the issue by changing port.

Hi, I'm having issues connecting to my server with SSH, I know the password is right becouse it works from the computer itself. tho it throws access denied after I enter a password.

What is this and how do I fix this?

I use PuTTY to connect.

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, M.Yurizaki said:

Are you trying to login as root? You normally can't ssh as root.

No I'm trying to connect as the user I setup when I installed (this works on my second server)

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, Joveice said:

No I'm trying to connect as the user I setup when I installed (this works on my second server)

did you allow the user in the ssh config?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Electronics Wizardy said:

did you allow the user in the ssh config?

Dident do this before, and if it's the /etc/ssh/ssh_config and by doing AllowUsers "username" then yes I did that and I restarted ssh after that.

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Joveice said:

Dident do this before, and if it's the /etc/ssh/ssh_config and by doing AllowUsers "username" then yes I did that and I restarted ssh after that.

does ssh work with other users?h

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Electronics Wizardy said:

does ssh work with other users?h

Don't have any other users, just installed the server.

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

Do you have console access? Does the VPS provider have any options to log in via console (RamNode provides such feature, for example)?
Have you set up SSH keys maybe, that you could use to log in without password?

HAL9000: AMD Ryzen 9 3900x | Noctua NH-D15 chromax.black | 32 GB Corsair Vengeance LPX DDR4 3200 MHz | Asus X570 Prime Pro | ASUS TUF 3080 Ti | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 6 TB WD RED | Corsair HX1000 | be quiet Pure Base 500DX | LG 34UM95 34" 3440x1440

Hydrogen server: Intel i3-10100 | Cryorig M9i | 64 GB Crucial Ballistix 3200MHz DDR4 | Gigabyte B560M-DS3H | 33 TB of storage | Fractal Design Define R5 | unRAID 6.9.2

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, jj9987 said:

Do you have console access? Does the VPS provider have any options to log in via console (RamNode provides such feature, for example)?
Have you set up SSH keys maybe, that you could use to log in without password?

It's a physics server, so I got physics access.

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

Enabled cleartext logins?

- ASUS X99 Deluxe - i7 5820k - Nvidia GTX 1080ti SLi - 4x4GB EVGA SSC 2800mhz DDR4 - Samsung SM951 500 - 2x Samsung 850 EVO 512 -

- EK Supremacy EVO CPU Block - EK FC 1080 GPU Blocks - EK XRES 100 DDC - EK Coolstream XE 360 - EK Coolstream XE 240 -

Link to comment
Share on other sites

Link to post
Share on other sites

You must enable cleartext password logins. These are disabled by default in Ubuntu (except for root, because by default root has a disabled login and can only be accessed via sudo elevation)

If you are running the desktop version of Ubuntu you must first install `openssh-server`.

Edit /etc/ssh/sshd_config

scroll down to the line `#PasswordAuthentication yes` and remove the # symbol. Save the file and restart the `ssh` service by typing `sudo service ssh restart`

You should be good to go.

However, a better approach is to create a public-private keypair which can be used for authentication. That's the preferred way to perform remote logins as multiple individuals can be granted access to a single user account without revealing their private keys

 

http://www.tomshardware.com/answers/id-2156756/ssh-ubuntu-access-denied.html

- ASUS X99 Deluxe - i7 5820k - Nvidia GTX 1080ti SLi - 4x4GB EVGA SSC 2800mhz DDR4 - Samsung SM951 500 - 2x Samsung 850 EVO 512 -

- EK Supremacy EVO CPU Block - EK FC 1080 GPU Blocks - EK XRES 100 DDC - EK Coolstream XE 360 - EK Coolstream XE 240 -

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, TidaLWaveZ said:

Enabled cleartext logins?

Well I typed my password in the username field to check if there was some keyboard layout things but no, the password was correct and physics access does work.

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

No one else that has an idea?

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

Seem to have found the issue, tryed to SSH into the server while it was installing updates (dident install openssh-server this time) and there the prompt was. so I guessed the default password logins for ikvm, and there I was in SMASH. how can I fix this? I want to ssh to my linux not to the server itself :P ? Motherboard is ASUS Z10PE-D16 WS

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, Joveice said:

Seem to have found the issue, tryed to SSH into the server while it was installing updates (dident install openssh-server this time) and there the prompt was. so I guessed the default password logins for ikvm, and there I was in SMASH. how can I fix this? I want to ssh to my linux not to the server itself :P ? Motherboard is ASUS Z10PE-D16 WS

This is a bit confusing, so you are able to login to the server over the KVM console but not SSH? Did you check to make sure there were no iptables rules blocking you ("iptables -F"). Can you check the logs to see what it's saying when you try to SSH into the server?

-KuJoe

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, KuJoe said:

This is a bit confusing, so you are able to login to the server over the KVM console but not SSH? Did you check to make sure there were no iptables rules blocking you ("iptables -F"). Can you check the logs to see what it's saying when you try to SSH into the server?

The logs for the ssh are emtpy, and I havent checked iptables, but I'm gonna try change the port to something else, then try that and see if that works.

Edit: Forgot to answer the first question, Well I don't know what SSH I got into, just that the default password I used to connect to the ikvm and view the screen worked on the ssh connection, then it gave me a "sql" looking terminal that said SMASH or something like that.

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Joveice said:

The logs for the ssh are emtpy, and I havent checked iptables, but I'm gonna try change the port to something else, then try that and see if that works.

If it's a firewall issue (iptables) then changing the port won't help. Can you run this command and post the output?

netstat -tulp | grep ssh

 

-KuJoe

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, KuJoe said:

If it's a firewall issue (iptables) then changing the port won't help. Can you run this command and post the output?


netstat -tulp | grep ssh

 

Will do when I have access to it in about 5 hours :) Will post result.

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, KuJoe said:

If it's a firewall issue (iptables) then changing the port won't help. Can you run this command and post the output?


netstat -tulp | grep ssh

 

Did not need to :) Solved the issue by changing port.

Back-end developer, electronics "hacker"

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×