Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My previously fine working ssh login now results in a "Operation not permitted" error after getting a connection accepted. I can't think of anything I changed except for restarting the server, so what could have gone wrong?

Here's the relevant log:

debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Operation not permitted
debug1: channel 0: free: client-session, nchannels 1
Connection to horst closed.
share|improve this question
    
Wild guess: the remote side's "login setup" (.bashrc et al.) scripts have a bug, so the shell terminates immediately. Does the remote user have sufficient access to their home directory? –  Ulrich Schwarz Sep 6 '12 at 11:31
    
In the server, try to ssh to a localhost. Does it work? How about scp from the client? –  Jari Laamanen Sep 6 '12 at 11:42
    
@UlrichSchwarz I tried temporarily renaming .profile, .bashrc and .bash_profile, to no avail. Access to the home directory is possible (via telnet, it's a NAS). Things worked fine until I rebooted, so I assume I screwed up something in sshd_config, but I can't remember having changed anything there... –  Tobias Kienzler Sep 6 '12 at 13:46
    
@JariLaamanen scp from the client fails with "Operation not permitted" as well. I'm afraid a truly "local" ssh is not possible since this is an NAS, and now the only way to access it is via some telnet exploit... –  Tobias Kienzler Sep 6 '12 at 13:48
1  
Are you by any means using sftponly? If yes, you might take a look at forum.buffalo.nas-central.org/viewtopic.php?f=71&t=22588 –  Jari Laamanen Sep 6 '12 at 14:12

1 Answer 1

up vote 1 down vote accepted

Has hinted at by Jari Laamanen, the solution lies in this buffalo.nas-central.org thread:

I have added root to a new group, which happend to be blocked from ssh access in the file /etc/sftponly. As pointed out in that thread, changing this file is only permanent if the line nas_configgen -c sftp is commented out in /etc/init.d/sshd.sh.

share|improve this answer
    
as a side-note, to allow non-root users acces, this thread provides many hints. Most important: Take care of user home directories, and add UsePriviledgeSeparation no to /etc/sshd_config. Setting /etc/profile's permissions may also be required –  Tobias Kienzler Sep 6 '12 at 15:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.