LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-21-2006, 06:12 AM   #1
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676
Blog Entries: 7

Rep: Reputation: 32
Disable root on ssh but not on winscp


Hi
Ive just disabled root login on ssh by doing the following:
set "PermitRootLogin no" in /etc/ssh/sshd_config

The result was what I wanted, however I can not use winscp to login as root now, is there a workaround that allows me to forbid root access to ssh but still allow root access to winscp

Thx for your suggestions
 
Old 04-21-2006, 11:26 PM   #2
mtndew
LQ Newbie
 
Registered: Jan 2006
Distribution: Fedora Core 5
Posts: 13

Rep: Reputation: 0
It is possible to restrict SSH access for a user while still allowing WinSCP.

WinSCP would have to be set to use SFTP only, and the /etc/passwd file would have to have the shell set to be /usr/libexec/sftp-server (or whatever the path to the binary is).

For root, this wouldn't be too wise, as you would not be able to login at the terminal either!
 
Old 04-22-2006, 07:06 AM   #3
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676

Original Poster
Blog Entries: 7

Rep: Reputation: 32
Well ..yes of course..it would not be a good idea to change the shell path of root...but still thanks for the clarification...what about setting an account that is not root...but still has global access to all the functions that winscp is able to do..like creating folders in the /root/ folder
 
Old 04-23-2006, 11:14 AM   #4
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Why not just do the standard thing and use winscp to log in as a non-root user? Copy your file to a non-root home directory then use an ssh session to move the file to where you want it. If you turn off root login, then root login is off.

If you can run winscp from the command line, you can script this, viz:
Code:
scp readpasswd $client:readpasswd
ssh $client sudo ./readpasswd
This is a segment from a script I use to remotely wipe/reinstall Linux systems. It downloads a script to the server then executes it as root to extract user credentials from the system I am preparing to wipe. Actually, I developed a big chunk of this using cygwin on WinXP.

Last edited by jiml8; 04-23-2006 at 11:20 AM.
 
  


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
Disable Root login via ssh UltraSoul Solaris / OpenSolaris 3 02-09-2007 02:18 AM
I cant log via ssh form Linux but can from WinSCP, why? mfeoli Linux - Newbie 4 03-31-2005 07:08 PM
disable root login with ssh linuxtesting2 Slackware 3 02-16-2005 12:33 PM
How can I disable root to ssh Soulstealer Linux - Security 2 12-12-2004 11:36 AM
How can I disable root login with SSH? blk96gt Slackware 9 10-02-2004 07:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:16 PM.

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