Hasitha's Blog is a blog that helps DevOps people do our regular tasks easily and perfectly.
Tuesday, April 16, 2019
How to remove ssh-agent process in redhat
When you log out, you want the ssh-agent process to be terminated automatically.
You can add below command in .bash_profile file
trap 'test -n "$SSH_AGENT_PID" && eval `/usr/bin/ssh-agent -k`' 0
If you need to remove existing processes,
for(( ; ; )); do kill $(ps -ef | grep ssh-agent | grep -v grep | grep -v grep | awk -F' ' '{print($2)}' | head -1 );echo "done"; done
Subscribe to:
Post Comments (Atom)
File Sharing using NFS in GKE Cluster
File Sharing using NFS in GKE Cluster There was a requirement to create common file sharing location which should be accessible by specific...
-
Once you generate SSH key pair to connect to a server using putty and you are going to import it into Xshell you will be noticed below notif...
-
You can use below shell script to simulate a pre-defined load on an API. #!/bin/bash ##########################################...
-
Here is a simple HTTP listener using Python BaseHTTPRequestHandler This Application will, listen to port 8000 on localhost respond to...
No comments:
Post a Comment