sshd started, but ssh/sftp/psftp not working

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat sshd started, but ssh/sftp/psftp not working
# 1  
Old 02-16-2010
sshd started, but ssh/sftp/psftp not working

The OS is CenOS.

The sshds is started, but ssh/sftp/psftp are not working with "time out" errors.

Code:
# service sshd status
openssh-daemon (pid  2894) is running...

# tail /var/log/secure
Feb 16 10:56:47 cenos userhelper[6285]: pam_timestamp(system-config-securitylevel:session): updated timestamp file `/var/run/sudo/root/unknown'
Feb 16 10:56:47 cenos userhelper[6288]: running '/usr/share/system-config-securitylevel/system-config-securitylevel.py' with root privileges on behalf of 'root'
Feb 16 10:58:38 cenos sshd[6322]: Connection closed by 192.168.2.6
Feb 16 10:59:29 cenos userhelper[6352]: pam_timestamp(system-config-securitylevel:session): updated timestamp file `/var/run/sudo/root/unknown'
Feb 16 10:59:29 cenos userhelper[6355]: running '/usr/share/system-config-securitylevel/system-config-securitylevel.py' with root privileges on behalf of 'root'
Feb 16 11:16:09 cenos su: pam_unix(su-l:session): session closed for user root
Feb 16 11:26:06 cenos su: pam_unix(su-l:session): session opened for user root by ning(uid=100)
Feb 16 11:33:22 cenos sshd[10718]: Accepted password for root from 192.168.2.6 port 48272 ssh2
Feb 16 11:33:22 cenos sshd[10718]: pam_unix(sshd:session): session opened for user root by (uid=0)
Feb 16 11:33:25 cenos sshd[10718]: pam_unix(sshd:session): session closed for user root

Please help. Thanks in advance!

Last edited by DukeNuke2; 02-16-2010 at 12:50 PM.. Reason: code tags!
# 2  
Old 02-16-2010
you try to login as user root? have you permitted root login in sshd.conf file? have you tried another user than root?
# 3  
Old 02-16-2010
I have tried it as both root and regular user, but got the same result.

Thank you!

---------- Post updated at 12:26 PM ---------- Previous update was at 12:09 PM ----------

This is an internal lan 192.168.2.0. Does the masquerade have something wrong?
Code:
[root@cenos ~]# ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=0.634 ms
64 bytes from 192.168.2.1: icmp_seq=2 ttl=64 time=0.616 ms
64 bytes from 192.168.2.1: icmp_seq=3 ttl=64 time=0.695 ms

[root@cenos ~]# service iptables status
Table: nat
Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination
Chain POSTROUTING (policy ACCEPT)
num  target     prot opt source               destination
1    MASQUERADE  all  --  192.168.122.0/24    !192.168.122.0/24
Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:53
2    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:53
3    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:67
4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:67
Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     all  --  0.0.0.0/0            192.168.122.0/24    state RELATED,ESTABLISHED
2    ACCEPT     all  --  192.168.122.0/24     0.0.0.0/0
3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
4    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable
5    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination


Last edited by Scott; 02-16-2010 at 01:47 PM.. Reason: Code tags please...
# 4  
Old 02-18-2010
Add gateway by "route". Problem solved.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mget with SFTP is not working

hi Team, I am connecting from one (A) linux server to another(C)/any linux server by sftp on A linux server: sftp userid@C password: mget is Not working fine I am using mget to pull the files. it shows mget as invalid command. But from (B) Linux server to (C) /to Any server Linux... (15 Replies)
Discussion started by: johnsnow
15 Replies

2. Linux

Put -r is not working in SFTP

Hi Folks, I am trying to copy a directory along with sub-directories to SFTP server. I have connected to SFTP and tried to run the below command: sftp> get -r abc/* It is throwing the error Invalid flag -r Can you please let me know the ways to copy a directory from Local to SFTP ... (1 Reply)
Discussion started by: kirans.229
1 Replies

3. UNIX for Dummies Questions & Answers

SSH tunnel working for ssh but not for sshfs

I'm trying to setup a link between my home pc (work-machine) and a server at work (tar-machine) that is behind a gateway (hop-machine) and not directly accessible. my actions: work-machine$ ssh -L 1234:tar-machine:22 hop-machine work-machine$ ssh -p 1234 user@127.0.0.1 - shh access on... (1 Reply)
Discussion started by: Vathau
1 Replies

4. Shell Programming and Scripting

AIX pam ssh/sshd configuration not allowing sed or awk

This is a weird problem. Following is my code. /opt/quest/bin/vastool configure pam sshd /opt/quest/bin/vastool configure pam ssh cat /etc/pam.conf | \ awk '$1=="ssh"||$1=="sshd"||$1=="emagent"{sub("prohibit","aix",$NF);}1' OFS='\t' > /etc/pam.conf cat /etc/ssh/sshd_config | \ sed -e... (2 Replies)
Discussion started by: pjeedu2247
2 Replies

5. Solaris

SSH: internal working but external not working

Hi, This is a strange issue: We have an sftp server. Users can ssh to it from internal LAN without any issue, but they can not ssh to it externally via firewall. Here is what I got: OS is Solaris 9. No hosts.allow and hosts.deny files. Please help. Thank you in advance! (7 Replies)
Discussion started by: aixlover
7 Replies

6. UNIX for Advanced & Expert Users

job is started with sshd daemon; wish to know its implementation details

Hello Gurus, In solaris server, one folder say /appl/prod/usr/sendme get files those need to be processed. The script named checkFile.sh can process the each file. This script checkFile.sh is not scheduled in crontab. But whenever file puts in sendme folder, the checkFile.sh is called and... (1 Reply)
Discussion started by: get_chandrakant
1 Replies

7. UNIX for Advanced & Expert Users

SFTP not working in the background

I'm modifying some code to SFTP files because the remote servername and user are changing. The keys have been correctly installed and I'm using the -B option to automate the actions following connection e.g. cd, put etc. This is all working nicely. However, when I wrap this up to call it from a... (0 Replies)
Discussion started by: JerryHone
0 Replies

8. UNIX for Dummies Questions & Answers

can't get sshd started - using knoppix

i don't have /etc/inet.d/sshd >which sshd /usr/sbin/sshd when I try to run sshd >sshd <ENTER> ...could not load hostkey.... i don't have a copy and paste , but perhaps somebdoy here recognizes the message thanks in advance (4 Replies)
Discussion started by: james hanley
4 Replies

9. AIX

It helps in the sshd on sshd.log

Friends, I made the installation of the ssh in the it conspires, I configured in the ssh_config the following parameters.. SyslogFacility AUTH LogLevel INFO that should generate sshd.log in the /var/log.... more no this generating. Somebody could help myself in... (0 Replies)
Discussion started by: sandba
0 Replies
Login or Register to Ask a Question