LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-02-2011, 09:51 PM   #1
0men
Member
 
Registered: Mar 2011
Location: Brisbane
Distribution: Windows 10, Red Hat, Debian
Posts: 183

Rep: Reputation: 22
Weird SSH files in /tmp


Hey guys,

I was just installing a package and noticed in my /tmp folder a number of ssh-"random string of letters" such as ssh-WHLTm14927.

I have disabled ssh in /etc/rc.d so does this mean someone is logging on through ssh to my machine ? Im not sure if its' suspicious or not. I've never used ssh.

Should i chmod -x /usr/sbin/sshd ??
One thought im having is that the daemon is still running and when i shutdown the machine its somehow crashing ssh and generating the files?? Any thoughs would be great

Thanks heaps guys.
 
Old 04-02-2011, 09:57 PM   #2
EdGr
Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 998

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
You likely used a program that calls ssh, such as rsync.
Ed
 
Old 04-03-2011, 09:52 AM   #3
thund3rstruck
Member
 
Registered: Nov 2005
Location: East Coast, USA
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 386

Rep: Reputation: 43
Do a quick audit with netstat:

Code:
$ netstat -nt
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 192.168.2.101:22        74.125.155.16:46988     ESTABLISHED
Look for a line where there is a LISTENING or ESTABLISHED state on port 22. If 22 is listening then SSH is up and running and if it's ESTABLISHED then there is an active connection to it!

Hope this helps...
 
1 members found this post helpful.
Old 04-03-2011, 01:07 PM   #4
cowyn
Member
 
Registered: Oct 2006
Location: Hangzhou, China
Distribution: Slackware
Posts: 49

Rep: Reputation: 15
Generally, none of SSHD's business.
Possibly you're using SSH-Agent?
 
Old 04-03-2011, 03:14 PM   #5
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
what cowyn said: ssh-agent creates an "mktemp" folder in /tmp, in which there is a socket. These files are not suspicious, but it would be a good idea to have them cleaned up appropriately.

In your shutdown script you can do that like this:
Code:
if [ ! -z "${SSH_AGENT_PID}" ]
then
    ssh-agent -k
fi
That will clean the currently active ssh-agent and folder up.

On the other hand, you can search your startup scripts and see if they start ssh-agent and comment that out.
ssh-agent is a program that helps ssh to provide the public key for password-less logins; ssh-agent --help won't help you, as it will start a new ssh-agent. Instead check out the man page: man ssh-agent.
 
  


Reply



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
My server may be compromised, weird files in /tmp LidoShuffle Linux - Security 8 02-06-2009 04:36 PM
what to do with files in /tmp Valkyrie_of_valhalla Linux - General 17 09-13-2006 03:44 PM
where did this tmp/ssh agent file come from? leftPeg Linux - Security 3 06-01-2006 07:58 AM
/tmp files Risc91 AIX 4 01-18-2005 02:06 PM
Numerous scb_*.tmp files in /tmp dburk Programming 3 08-18-2003 04:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:27 AM.

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