ssh question


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ssh question
# 1  
Old 06-02-2008
ssh question

hi all,

I setup a new server using centos 5.0 with webmin installed and its working fine. the only problem i found is that I now cant ssh into the box anymore for some reason. I am able to ssh out of it no problem tho. I did check to see if ssh was running and it was. I did the following to verify

ps -ef|grep sshd

and

/etc/init.d/sshd status

But when I try to connect via another box it just times out. Just to make sure I checked the firewall just to see if that port is open and it is far as i can tell.

Any more suggestions to try ?
# 2  
Old 06-03-2008
Can you connect via ssh from the box to itself? What does
Code:
iptables -L

show?
Does
Code:
netstat -a| grep -E "ssh|\:22"

show the open ssh port and if yes, with a LISTEN in the last column?
# 3  
Old 06-03-2008
Run the ssh with -vv flags to see where and why it's timing out.
# 4  
Old 06-03-2008
the iptables -l command did not work for me

now doing this

netstat -a| grep -E "ssh|\:22"

resulted in this

Code:
tcp        0      0 xxxx.net:2208         *:*                         LISTEN      
tcp        0      0 xxxx.net:2207         *:*                         LISTEN      
tcp        0      0 *:ssh                       *:*                         LISTEN      
unix  2      [ ACC ]     STREAM     LISTENING     7834   /tmp/ssh-wxNKGs2925/agent.2925


Now when I do this

Code:
ssh -vv xx.xx.xx.10

It just times out .

Code:
# ssh -vv xx.xxx.xx.10
OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to xx.xxx.xx.xx [xx.xxx.xx.xx] port 22.
debug1: connect to address xx.xxx.xx.xx port 22: Connection timed out
ssh: connect to host xx.xxx.xx.xx port 22: Connection timed out

Now I can ssh to other boxes on the outside.

When I initially setup this box ssh was working fine somehow it got "broken".
Thoughts?

Thanks
# 5  
Old 06-03-2008
Did it say it doesn't know iptables, or did it moan about the lower case L?
Good thing, that your ssh-demon is listening so far. Can you check out if you have the same problem with any other client connecting to that server, ie. rsh, telnet, ftp?

Can you ping it from other machines or do a nmap on it's ports?

Just curious, what does a
Code:
netstat -rn

show?
# 6  
Old 06-03-2008
Ok wow yeah I cant ping the server from another one it just hangs weird.
The server is behind a firewall router could that be the problem pinging wise? I checked the router firewall and the ports for ssh, telnet and ftp are open and I can ftp into the server from the outside no problem and the apache server is working fine. But I cant telnet into the box either.
# 7  
Old 06-03-2008
Code:
# iptables -L
bash: iptables: command not found

also

Code:
# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.61.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
0.0.0.0         192.168.61.1    0.0.0.0         UG        0 0          0 eth0

hmm this is weird shouldnt the destination ip be the one I assigned for eth0? which was 192.168.61.10 i know the router internal ip is set too 192.168.1.1
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Ssh tunnel question

Hi all I have a suite of scripts that ssh to remote servers within a cluster and run some tests. This is done from a central server so that all of the test results can be captured in one location. Problem is I now have 509 tests and the number is growing. The scripts work by establishing a... (2 Replies)
Discussion started by: steadyonabix
2 Replies

2. Shell Programming and Scripting

Question about parameters in ssh

Hello where I can find or can anybody send me a full list with parameters of ssh. I hope to understand what I mean. For exam -xpvf (tar -xpvf file.tar.gz) -x -p -v -f what do any of these parameters I have command for extract tar.gz file but I want to do this without folder but I don't know what... (2 Replies)
Discussion started by: gladiator6
2 Replies

3. Red Hat

ssh daemon question

Hi, I'm trying to connect from one server to another via ssh, the server that I'm connecting from only has openssh installed. The server that I'm connecting to has the following packages installed: ssh-3.2.9.1-ML_RHEL4 openssh-3.9p1-8.RHEL4.12 openssh-clients-3.9p1-8.RHEL4.12... (0 Replies)
Discussion started by: newb1000
0 Replies

4. UNIX for Advanced & Expert Users

SSH and alias question...

i regularly login to servers that I donot control. On many of these servers I do not have home dir. I need to set aliases from my host to the remote machine when I ssh in. for example from when I go from hosta --> hostb. I want all my aliases from hosta to be present in hostb once I login. ( i... (5 Replies)
Discussion started by: vijayrajah
5 Replies

5. Cybersecurity

ssh question

I have a query on ssh. /home/user1/ # ssh remote_host When the fingerprint created and saved in /home/user1/.ssh/known_hosts file, is the fingerprint the public key of remote_host? (2 Replies)
Discussion started by: ij_2005
2 Replies

6. Solaris

Silly question regarding SSH.

Hi Guys, I have installed SSH package on server as well as clients. I think I need to these steps next. Login as root on the server. 1) ssh-keygen -b 1024 -t rsa -f /etc/ssh_hosts_key.pub -N " " Login to root as the user. 2)ssh_keygen -b 1024 -t rsa Enter the phrase Basically this... (3 Replies)
Discussion started by: nitinkgoud
3 Replies

7. UNIX for Dummies Questions & Answers

ssh question

Dear all, I have a question regarding the remote access a server without login using "ssh". I'm thinking if there is anyway to send a certificate pass to ssh command. For example, I need write a script for a user who doesn't have access to any server but running this script. Within the... (1 Reply)
Discussion started by: ting123
1 Replies

8. Cybersecurity

Casual Question regarding ssh

I have openssh installed on the Unix machines. I have also set the syslog level to auth.debug so that the all the ssh entries are logged. I have this vague message which in no way affects my ssh session but still i am curious Whenever i log in it gives this error pam_secretd: error... (5 Replies)
Discussion started by: DPAI
5 Replies
Login or Register to Ask a Question