How can I execute a few commands when a specific user with a specific IP logs on via ssh?
Execute commands when specific user and ip login to ssh
ssh;command
Everything in ~/.bash_profile will be executed when a user logs in, so you can use that. For example with this code:IP=`w | grep DarkGL | awk '{print $3}'`if [ $IP = 192.168.10.10 ];        then echo MonkeyfiAn alternative is using SSH forced commands, but you cannot configure this based on IP. This would mean a user can only run a specific binary and not even list files anywhere. We implemented this with git, so a user can only run the git binary.If you can explain why you would want to do that, we can help things along.