can't chroot new users
On my Apache server I need to create new user accounts that would only access a specific folder, but when I try to change their root directory in ssh the server refuses to do it. I tried to edit the sshd_config file to change the root directory of every accounts automatically. Here is the code:
Match Group sftpusers ChrootDirectory /var/www/clubs/%u ForceCommand internal-sftp X11Forwarding no AllowTcpForwarding no
the idea is to set the root directory of user1 to /var/www/clubs/user1 if he belongs to the sftpusers group.
The server refuses the connection and according to the logs the user was trying to access "/".
Please let me know if you need more informations.
See also questions close to this topic
Run a cron job for a Php script in localhost of windows when the default port is not used
I have a task written in a php script which should run daily at a specific time.The task is to call an API method and write the results in a mysql database. I'm using xampp. Since port 80 is occupied by another task I've changed the port Apache server is using by changing the httpd.conf according to How to change XAMPP apache server port?
To set up cron job for my requirements I followed the steps here: Run Cron Job on PHP Script, on localhost in Windows
But the cron job doesn't work. The same steps worked well when the default port (80) was used in another machine.
Could someone let me know where else should I modify the port number for the cron job to work?
Redirect subdirectory to root subdirectory without changing url PHP
This is my subdirectory and it has one index.html file running on apache server.
I need to redirect all the requests to this directory like
https://example.com/app1without changing the URL.
If user access to
https://example.com/app1/testit should be redirected to
https://example.com/app1but URL should remain same as
SSL ciphers in SSL request log on apache 2.2
Under SSL request logs there are multiple lines which says TLSv1.2 ECDHE-RSA-AES256-SHA384 with GET method.
Normally It shows TLSv1.2 AES256-SHA256 row lines.
What does TLSv1.2 ECDHE-RSA-AES256-SHA384 means for website URL fetch?
If it's good to disable what step to follow on apache 2.2 with RedHat environment?
Please let me know more on this.
Using snort/suricata, I want to generate an SSH alert for every failed login to my Home Network
I am setting up an Intrusion Detection System (IDS) using Suricata. I want to write a custom rule which will generate an alert whenever a failed login attempts occur to my virtual machine.
alert tcp any any -> $HOME_NET 22 (msg:"SSH Brute Force Attempt";flow:established,to_server;content:"SSH";nocase;offset:0; depth:4;detection_filter:track by_src, count 2, seconds 2;sid:2005; rev:1;)
I tried various combinations for SSH rule but not able to see any alerts in the Suricata Alerts section with multiple bad SSH attempts. (Bad attempts => using invalid password to generate alerts)
Kindly let me know how to go about this.
I cant find drop-down list that enables ssh access on my Bluehost cpanel,
I can't find the drop-down list shown in tutorials I found online. Example:https://help.vaultpress.com/bluehost-ssh/
Executing SSH with ShellJs
I have been using shelljs to execute certain set of commands. So i tried to connect to a remote ubuntu server over ssh via shelljs. This is my nodejs file.
var shelljs = require('shelljs'); shelljs.exec('ssh -i [path/to/pem/file] ubuntu@[taregt_ip]');
But i get this error:
Pseudo-terminal will not be allocated because stdin is not a terminal.
So how to solve this issue or is there any other utility to connect to ssh with one single command.
EDIT: the link you guys are posting for me to refer in not the duplicate of my problem.
Entering chroot, issue command, stay in chroot
I have to issue a terminal command that will enter a chroot, issue a command (such as "ls"), and then stay in chroot so the user can type more commands.
Right now this is the best I've got:
cat << EOF | sudo chroot /path/to/chroot ls EOF
Unfortunately this exits the chroot as soon as it is finished though.
How can I stay in the chroot?
Move chroot to sdcard
I have chroot installed in
/data/local/nhsystem/kali-armhmI want to remove it to external sd card or internal storage. I am running out of device storage.
My main problem is I can't install more packages because of low storage. I am beginner with linux. I have searched a lot to get my answer but failed.
(I have kali-nethunter installed in my Android 6.0)
Failed to chroot to Debian Wheezy armhf at Android 5.0 with linux kernel 3.10
I prepared a Debian Wheezy chroot environment for armhf using two stages of debootstrap:
# debootstrap --foreign --arch armhf wheezy wheezy-armhf ... # chroot wheezy /deboostrap/deboostrap --second-stage
Then I copied all files from wheezy/* to the pen drive and plugged in to the my TV with Android. After that I mounted usb pen drive and tried to chroot using busybox (I have used adb):
# busybox chroot wheezy/ /bin/bash chroot: can't execute '/bin/bash': Function not implemented
Does anyone know what I did wrong?
P.S: TV is based on the quadcore Novatek Cortex-A9 SoC.