LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-24-2007, 07:02 PM   #1
blinton25
LQ Newbie
 
Registered: Oct 2006
Posts: 10

Rep: Reputation: 0
can't login using ssh (via Putty) remotely


Hello,

I can't login as root using SSH (Putty) remotely. I keep getting an access denied message.

I thought I was typing the password wrong but when I go to the physical machine I can login using ssh or su.

The distribution is ubuntu.

Any idea why this might be happening?
 
Old 05-24-2007, 07:03 PM   #2
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 110Reputation: 110
Does the other machine that you're logging into allow root ssh logins? Personally, I wouldn't allow it. Can you ssh as a normal user? If so, just su from a normal user account.
 
Old 05-24-2007, 07:03 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Log in as a regular user and then use sudo to run root commands.
Ubuntu has disabled root logins. Even if they didn't, you should always disable root logins for ssh.
 
Old 05-24-2007, 07:09 PM   #4
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
By default an OpenSSH server has Allow Root Login disabled.

Better for security.

/etc/ssh/sshd_conf
 
Old 05-24-2007, 07:14 PM   #5
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Rep: Reputation: 15
Quote:
Originally Posted by dxqcanada
/etc/ssh/sshd_conf
I think you've got the idea by now, I just want to stress that, after you login as a regular user with sudo access, you should run
Code:
sudo su -
to become root. Then you can alter SSHD options that you can find in '/etc/ssh/sshd_conf'. As everybody is saying, it's not a great idea to allow root to login remotely.

Cheers
 
Old 05-24-2007, 11:49 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Ubuntu doesn't allow su'ing directly to root by default. Root account logins are disabled. You need to use sudo.
 
Old 05-25-2007, 05:32 AM   #7
blinton25
LQ Newbie
 
Registered: Oct 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks a lot. When I create the new user (adduser) are there any arguments that I need to specify for ssh?
 
Old 05-25-2007, 10:16 AM   #8
Braynid
Member
 
Registered: May 2006
Location: Romania
Distribution: CentOS
Posts: 140

Rep: Reputation: 15
Not necessarily. If you just add a user ssh login is enabled by default.
 
Old 05-25-2007, 11:00 AM   #9
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Rep: Reputation: 255Reputation: 255Reputation: 255
check the sshd_config in the /etc/ssh and the port concerned

then /etc/init.d/ssh restart

=======================
it should work.

If it s again a bug from ubuntu, please report it via
sudo apt-get install reportbug nano
reportbug and follow the procedure

Enjoy
 
Old 05-25-2007, 07:59 PM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Dictionary attacks will target system user accounts and root account.
If only a handful of users are authorized to log into the machine using ssh, you can add their names to "AllowUsers" in /etc/ssh/sshd_config. This will disallow other logins including by system users. This is a quick and easy way to lock down ssh. One other thing to consider is to only allow the ssh-2 protocol. By default, if ssh-2 fails ssh-1 is tried. Ssh-1 has some problems so hackers will try to login with this protocol.
 
Old 05-26-2007, 04:09 AM   #11
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by jschiwal
Dictionary attacks will target system user accounts and root account.
If only a handful of users are authorized to log into the machine using ssh, you can add their names to "AllowUsers" in /etc/ssh/sshd_config. This will disallow other logins including by system users. This is a quick and easy way to lock down ssh. One other thing to consider is to only allow the ssh-2 protocol. By default, if ssh-2 fails ssh-1 is tried. Ssh-1 has some problems so hackers will try to login with this protocol.
How to increase security with a SSHd listening to either port 80 or 8080 ? Is this Secured or Mad ?
 
Old 05-27-2007, 01:17 AM   #12
blinton25
LQ Newbie
 
Registered: Oct 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Ok, I was able to get in, thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't login remotely using SSH or Telnet jviezel Linux - Networking 4 12-31-2006 03:12 PM
users created by "useradd" cannot remotely login with PuTTY. Why? Kreshna Linux - Software 4 10-16-2006 09:56 AM
can't login remotely to SSH server using FileZilla rob_xx17 Linux - Networking 5 08-22-2006 07:35 PM
Access Denied when I try to login remotely to my SSH server running on Cygwin. andrew_cz General 0 05-02-2006 09:46 AM
help with setting up login to server remotely using ssh LAdProg2005 Linux - Software 2 10-05-2005 01:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration