---
title: "SSHD，开启sftp其他用户登录的方法"
author: "romejiang"
date: "2010-08-06T14:29:30Z"
tags: ["CentOS", "Google", "RedHat", "SSH"]
categories: ["操作系统"]
slug: "sshd-sftp"
draft: false
lastmod: "2010-08-06T14:31:37Z"
id: 730927
url: "https://romejiang.iteye.com/blog/730927"
---

遇到一个很无厘头的问题，ssh任何用户都可以登录，但sftp只能用root登录，google了一上午，才找到原来需要这样，原因未知，好像CentOS不需要这样。也许是RedHat特有的方式把。

 

需要将用户的shell指向 sftp-server

 

usermod -s /lib/xx/sftp-server sftpuser