|
|||
|
Will SCP work if you don't allow SSH access?
I here that SCP uses SSH protocol, so I just want to make sure.
We no longer allow SSH access for our hosted members. Now some are looking for a different method of securely transferring files and they are not thrilled about having to use FTPS. So, I take it that SCP is still functional and can be used by the vsite owners to transfer files around? Yes? |
|
|||
|
Will SCP work if you don't allow SSH access?
No.
SCP will not work without SSH access. SCP is like RCP over a channel secured by the SSH protocol. There *are* ways to leave SSH enabled, but disallow shell-level access while continuing to allow SFTP and SCP, but this requires a bit more configuration. Brian Pence SSH / Telnet Client for Windows XP, Vista, Mobile (and others) AbsoluteTelnet SSH/SFTP client for windows |
|
|||
|
Infopro, thanks for this. This is interesting however because earlier we could not get SFTP working with one of the accounts, only FTPS. Perhaps we needed to generate new ssh keys for this?
Thanks again, I'm a bit of a dummy when it comes to SFTP vs FTPS and the like. |
|
|||
|
Quote:
Command: Trust new Hostkey: Yes Error: Disconnected: No supported authentication methods available Error: Could not connect to server I am using our SSH (alternate) port, but again, it seems that this will not work because we do not allow SSH access? What am I missing here? Does something in /etc/ssh/sshd_config need to be configured differently? P.S. Yes, we do have this at the bottom of the sshd_config file: # override default of no subsystems Subsystem sftp /usr/libexec/openssh/sftp-server Last edited by jols; 08-12-2009 at 01:46 AM. |
|
|||
|
Quote:
I have come upon a solution for this by putting together a few different posts on this subject, the method goes like this: --------------- To allow SFTP access but without shell access, you must first enable (jailed) shell via WHM. But then run the following so they do not have command line/shell access: usermod -s /usr/local/cpanel/bin/noshell username Of course, replace "username" with the actual account user name. Then generate a key pair for the account in question: cd /home/userid/.ssh Run: ssh-keygen (Accept the default names, i.e. id_rsa) Enter any passphrase and be sure to remember the passphrase used. After this two files will be created: id_rsa ***This is the private key. id_rsa.pub ***This is the public key. Now entering the following: cat id_rsa.pub >> authorized_keys The id_rsa file is the private key to be used with FileZilla: Preferences ---> SFTP ---> add key file. Then configure FileZilla with SFTP and port - (insert ssh access port here), the user ID but NO password. Remove both files from the on-line account: id_rsa.pub id_rsa Now SFTP transfers work. --------------- A significant aspect of this is to switch on SSH access for the account, but remove their capability to reach the shell command line: usermod -s /usr/local/cpanel/bin/noshell username This part was derived from this post: Strange SFTP problem... This concludes about three days of research on this one. But if anyone has anything to offer in addition, I would certainly like to know more, Particularly with regard to potential security vulnerabilities that may arise from using this method. |
|
|||
|
Sorry I did not reply back sooner, but it seems you have found the solution yourself. You're right in that turning *OFF* SSH altogether not only disables shell access, but also scp and sftp as well. The trick is to leave SSH on, but disable access to the shell as you found.
Brian Pence Celestial Software AbsoluteTelnet SSH/SFTP client for windows |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "Remote scp sent illegal error code" and slow SSH connection | Brook | cPanel and WHM Discussions | 3 | 07-18-2009 09:22 PM |
| Allowing resellers access to Backup via SCP | cresedo | cPanel and WHM Discussions | 16 | 08-14-2007 04:06 PM |
| Anyone got the SSH/Shell Access app to work? | chrisjj | cPanel and WHM Discussions | 4 | 07-22-2006 07:46 PM |
| SSH Does not Work --How to fix?? | wimp | cPanel and WHM Discussions | 3 | 05-23-2006 05:44 AM |