LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-29-2006, 09:34 PM   #1
leftPeg
LQ Newbie
 
Registered: Jan 2006
Posts: 19

Rep: Reputation: 0
where did this tmp/ssh agent file come from?


Hi,
Could someone please tell me if I should be worried about seeing the following file on my system

/tmp/ssh-XXPT3WBp/agent.946

I use putty to log in but didn't think I was using ssh-agent.

Thanks.

D.
 
Old 05-31-2006, 07:03 AM   #2
imagineers7
Member
 
Registered: Mar 2006
Distribution: BackTrack, RHEL, FC, CentOS, IPCop, Ubuntu, 64Studio, Elive, Dream Linux, Trix Box
Posts: 310

Rep: Reputation: 30
Hello LeftPeg,

Its ok, nothing to worry about!
You may have OpenSSH server running in the background which is creating those temporary files. To confirm, you may run following command:-
service sshd status


Have fun
 
Old 05-31-2006, 07:08 AM   #3
imagineers7
Member
 
Registered: Mar 2006
Distribution: BackTrack, RHEL, FC, CentOS, IPCop, Ubuntu, 64Studio, Elive, Dream Linux, Trix Box
Posts: 310

Rep: Reputation: 30
Post

Hello again,

If you are running a system which does not have service command

you may fire up following:-

Quote:
ps aux | grep sshd
and look for something like
Quote:
root 4324 0.0 0.1 5116 1224 ? Ss 09:05 0:00 /usr/sbin/sshd

PS All the above commands must be fired as root



To stop those services running in background you may:-
Quote:
chkconfig --level 2345 sshd off
Bye
 
Old 06-01-2006, 08:58 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608
Here's a cronjob script examine and remove stale ssh-agent sockets. It logs which user uses / has used what ssh-agent sockets.
Code:
# SSH
find /tmp -maxdepth 1 -type d -name ssh-\* | while read dirn; do
 find ${dirn} -type s -maxdepth 1 -name agent.\* | while read f; do
  ownage=$(stat -c "owner:%u,group:%g" "${f}")
  /sbin/fuser "${f}" 2>&1>/dev/null
  case "$?" in
   0) logger "SSH socket dir \"${dirn}\" in use by ${ownage}.";; 
   1) rm -rf "${dirn}"; logger "Removed stale SSH socket dir \"${dirn}\" for ${ownage}.";;
   *) logger "Caught unhandled retval \"$?\".";;
  esac
 done
done
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 03:50 AM
ssh-agent/ssh-add question mega Slackware 2 01-26-2005 04:09 AM
ssh-agent alaios Linux - Security 5 05-02-2004 12:24 PM
Create file using 'touch ./tmp.$$', file tmp.3941 is created, why? huangyanfeng Linux - General 1 04-13-2004 04:36 AM
ssh-agent podollb Linux - Networking 15 10-16-2003 01:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration