Portal Home > Knowledgebase > Articles Database > Few linux (centos) queries..


Few linux (centos) queries..




Posted by lunahost, 06-05-2013, 06:41 AM
I've got a couple of questions regarding Linux. 1. I'm trying to setup RSSH to restrict user access to the shell. I've created a user specifically for SFTP access to transfer files, i don't this account to use the CLI and i don't want to use root for SFTP... RSSH seems a good fit for this. has anyone used it? here's what i done: useradd test passwd test usermod -s /usr/bin/rssh test now when i login to shell it says: Last login: Tue Jun 4 20:48:39 2013 from 86.19.166.224 /usr/bin/rssh: Permission denied Connection to 198.211.124.93 closed. To my knowledge this is doing what it's supposed to be doing? So i've logged back in as root, edited the config file: vi /etc/rssh.conf uncommented allowsftp, saved the file... When i try to login using my SFTP client (Transmit) i'm getting: The user name or password was not accepted by the server. Where have i gone wrong? I was lingering in a Linux chat and someone mentioned something about IP tables, i haven't touched this so could be the cause? One thing i have done is changed my SSH port to 2121, so will i be using this for SFTP? Maybe this is causing the conflict, however i don't know how to diagnose this issue. If i try to login to sftp via terminal it gives this error for both root and test user: ssh: connect to host 2121 port 22: No route to host Connection closed 2. How can i successfully install phpMyAdmin, i'm finding the command line really hard to use for huge databases. I've tried a guide but it never worked, something about php54w conflicting with php5.3. 3. I keep getting Write failed: Broken pipe if i leave the terminal for a few minutes, i'm guessing it's the time out, can i increase this? it freezes and kicks me off, so annoying.

Posted by Fapvps, 06-06-2013, 12:10 PM
What distro are you using?

Posted by Fapvps, 06-06-2013, 12:48 PM
Didn't read the title... Ok. 1. Did you restart sshd before trying to connect via sftp? 2. For PHPMyAdmin you need Apache and PHP installed. Simply copying the contents of the PHPMyAdmin package will allow you to manipulate your db's. You simply log in using your mysql user name and password and you will be able to manage the dbs acceptable to that user. 3. lower the ClientAliveInterval on your ssh client.

Posted by Website themes, 06-06-2013, 01:35 PM
1. Set SSHD to run on a port that is less than or equal to 1024. Only root can open a port like that so it is more secure. Be careful making the above change. Make sure you allow access to your SSHD port in IP tables. Don't lock yourself out! Once you've done this you should connect via SFTP using the new port. SFTP is built into SSHD so it operates on the same port. If you want to try connecting via the command line this is the way: sftp -P user@host For example: sftp -P 1001 user@example.com



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
RBL in Cpanel (Views: 620)

Language: