Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
how to block a particular user from accessing to the machine via ssh?
but i still wan't to have the user be able to access the SFTP server witch is a subcategory of sshd
IP blocking will not work as the user might have a dynamic IP address
and giving the user a fake password will not work as well as the user needs the password to access FTP and/or SFTP
Distribution: At home: Arch, OpenBSD, Solaris. At work: CentOS, Debian, Ubuntu
Posts: 3,625
Rep:
I've never done this myself, but from what I've heard the best way to do this is to use [URL=http://sublimation.org/scponly/wiki/index.php/Main_Page]scponly[/URL} (which also supports SFTP).
this is a regural user without access to machine via ssh
only with FTP or SFTP
if i can't get SFTP to work, i'll just use FTP then, it's no big problem
could i also do a group thats not permited to login through ssh?
so that i would create a group named nossh or something
and set this group as a group to a user, so that every user in this group wouldn't have access to ssh?
edit: if i set a users shell to /bin/false it doesn't work
tried that one...not on purpose when i changes roots shell to /bin/false by mistake
I think that if you deny someone ssh access that you also deny them sftp access, but I'm not certain. The sftp manpage refers to sshd_config. Read through the sshd_config manpage. You can use DenyGroups, but using AllowGroups to allow only the authorized groups may be a better idea. Using this denies all other groups.
There is a "Subsystem" entry but I don't know if these options would allow someone denied with DenyGroups. I kind of doubt it.
It sounds like the "scponly" option is the way to go. That is why why they wrote it I suppose.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.