LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-04-2007, 05:46 AM   #1
abhi2778
LQ Newbie
 
Registered: Jul 2006
Posts: 13

Rep: Reputation: 0
Sftp


Hi

I am not able to sftp from the local m/c with the root id,
Other than root . PLz help.
 
Old 05-04-2007, 05:59 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Do you mean you cannot use ssh/sftp by logging in with user root at the server-end, but can as a regular user? In that case it's probably the server-end (where sshd is running) that restricts it. It's not wise to run ssh/sftp as root, it's risky, and you should find another way of achieving your task, but here's something to try if you do want to use root account (read: log in to the other machine over ssh/sftp as root).

We'll do this thing on the server-end, the machine where ssh daemon (sshd) is running. One thing which tells to prevent logging in as root over ssh (sftp too) is sshd's configuration file. Check /etc/ssh/sshd_config for a line that talks about PermitRootLogin:
Code:
grep Root /etc/ssh/sshd_config
I think it's by default, or should be, like this:
Code:
PermitRootLogin no
That denies any connection that tries to give root as username. To let root log in over ssh/sftp, change that to
Code:
PermitRootLogin yes
by running a text-editor of your choice and editing the appropriate line. For this you obviously need privileges on the server-end to alter the file; possibly root privileges. Like I said, it's not a wise thing to do. After this you probably have to restart ssh service; on most distributions you'll achieve it by running this as root:
Code:
/etc/init.d/ssh restart
Then try again logging in.

Last edited by b0uncer; 05-04-2007 at 06:01 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
Anybody know anything about sftp??? markw8500 Linux - Software 6 05-19-2006 08:44 PM
How do I use sftp to upload my web site? (no sftp tar command) johnMG Linux - Networking 6 06-21-2005 09:14 PM
SFTP Help szahri Linux - Newbie 1 03-18-2005 01:11 PM
Sftp mr_a_ali Linux - General 1 08-18-2004 01:28 PM
Files truncated by sftp/sftp-server at 65kb gato Linux - Networking 1 12-18-2003 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:24 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