Sign script in Linux for SSH access [closed] - security

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want grant user rights to copy a specific file from a remote server via SSH. And I do not want to give him any opportunity to execute something else on a remote server.
I have an access to a remote machine but I'm not an adimistrator, and I want to give another user possibility to copy specific file but nothing else.
Is there any way to sign a script in linux to avoid modification of this script or something similar that could help?

There is a solution to restrict SSH run only specific command:
http://chihungchan.blogspot.com/2008/08/restrict-ssh-to-run-specific-command.html

Related

Command Logs Ubuntu [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is there anyway that i can log all the commands that a certain user or user group has run in an ubuntu CLI.
I need to keep a track of all the commands run by a certain group of users say
UsrGrp1:usr1,usr2,usr3
as i'm running a Cluster of machines and all are being controlled by different users. And i need to monitor those through the root user of every machine.
The history command gives me all the command logs. But it can be modified by the user itself. So i need to keep the logs under the root user only.
You can try logkeys a keylogger for linux. Another options could be script but with this you need to write a trigger to start it at each user login.

How do I access a remote Windows command line from a linux shell? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
It looks like a there are a few options out there, but what's the simplest way to do it?
It looks like you can install OpenSSH on Windows, but I'd like to use existing utilities if possible.
I saw that Windows server has the new Windows Remote Shell. Is there some way to access that from a linux terminal?
You can use PowerShell -> run-powershell-through-ssh

Limited permissions on linux [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want to give a specific user on Linux some privileges to enable him to run commands like shutdown or apt-get. I don't want to use the SUID bit since there are other users that I don't want to let them use these commands.
How do I do something like this?
sudo would probably be the easiest way to do this. You'll want to add something like the following to the sudoers file
username ALL=(ALL) /sbin/shutdown, /usr/bin/apt-get
where username is replaced with the user's actual username. You should be able to google for some examples - here is one such page.
Editing the sudoers file can be done safely by using the visudo program.

Unauthorised Perl Scripts [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
One of my servers just had the memory exhausted by a load of Perl scripts, we use plesk and they seem to have appeared under the /var/www/vhosts/domainexample.com/cgi-bin/ directory, I managed to stop all of the processes and delete the scripts but I have absolutely no idea how they would've got there.
Can someone point me in the right direction in order to prevent further attacks?
Who should have access to your webserver machine?
Does this include the owner/operator of domainexample.com?
Do you expect the owner to be placing cgis on your server?
Does domainexample.com need to run cgis?
does domainexample.com need to run perl?
You might want to start researching here:
http://httpd.apache.org/docs/current/misc/security_tips.html

How to move files from a computer connected via SSH to a VPS? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I know that scp is frequently used to move files between servers, but I'm not sure how I can reference my computer as a server. If scp is the right command to do this then what am I missing?
Just scp /some/local/file youruser#yourremoteserver:/remote/path
Reverse the two arugments to copy a remote file to local.

Resources