LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-07-2013, 05:07 PM   #1
wwipro
LQ Newbie
 
Registered: Jun 2011
Posts: 29

Rep: Reputation: Disabled
sftp login failure


Hello:
$ sftp sftpid@myserver
password: ********
Received message too long 1416128883

The account sftpid's shell is /sbin/nologin. If i change it to other shell, such as /bin/bash, sftp is fine.
How could I keep sftpid's login shell as /sbin/nologin ?
Thanks.
Warren
 
Old 08-07-2013, 05:08 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
You cant... sftp IS ssh.


http://kb.iu.edu/data/akqg.html
 
Old 08-08-2013, 01:23 AM   #3
eklavya
Member
 
Registered: Mar 2013
Posts: 636

Rep: Reputation: 142Reputation: 142
Whar do you exactly want to do,if you do not want to log in just stop the ssh service.

If it is /sbin/nologin , you simply can't login using sftp (ssh).

The entry is in file /etc/passwd

It shows the current shell(status) of user with the username.
 
Old 08-08-2013, 12:58 PM   #4
wwipro
LQ Newbie
 
Registered: Jun 2011
Posts: 29

Original Poster
Rep: Reputation: Disabled
Thanks to Kustom42. I changed sftpid's login shell to /bin/bash.
 
Old 08-08-2013, 09:15 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You can set the sshd_config (server end) to sftponly and match on eg user
http://www.openbsd.org/cgi-bin/man.c...nfig&sektion=5
 
  


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
sftp non-interactive login Laertiades Linux - Newbie 10 07-04-2012 10:11 AM
cannot login with sftp but with ssh MattiasKilbo Linux - Server 8 11-08-2009 03:45 AM
SFTP auto login works one way only? jchambers Linux - Newbie 6 01-03-2009 01:29 PM
cannot login into SFTP server using Net::SFTP cccc Programming 1 10-31-2007 06:23 AM
sftp with no login ryedunn Linux - Newbie 3 01-04-2007 09:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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