Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to ssh remotely #86

Open
jlamb85 opened this issue Apr 17, 2017 · 11 comments
Open

Unable to ssh remotely #86

jlamb85 opened this issue Apr 17, 2017 · 11 comments

Comments

@jlamb85
Copy link

jlamb85 commented Apr 17, 2017

I am unable to ssh remotely unless coming from same subnet. Please advise me of fix action or things to try

@lmeinecke
Copy link
Contributor

lmeinecke commented Apr 17, 2017 via email

@fcaviggia
Copy link
Owner

Check the TCP WRAPPERS (/etc/hosts.allow, /etc/hosts.deny), sshd_config (/etc/ssh/sshd_config), and your Firewall (/root/iptables.sh), and networking (/etc/sysconfig/network_scripts/ifcfg-*) configuration files.

@jlamb85
Copy link
Author

jlamb85 commented Apr 17, 2017

Thanks. I will check all of these things Wednesday and get back to you guys.

@jlamb85
Copy link
Author

jlamb85 commented Apr 19, 2017

I forgot to mention that this is RHEL6

/etc/hosts.allow
ALL: 127.0.0.1 [::1}
sshd: ALL

/etc/hosts.deny
ALL: ALL

/root/iptables.sh - not found

/etc/ssh/sshd_config

Port 22
ListenAddress 192.168.1.31
Protocol 2
SyslogFacility AUTHPRIV
LogLevel INFO
AllowGroups sshusers
LoginGraceTime 2m
PermitRootLogin no
StrictModes yes
MaxAuthTries 3
MaxSessions 3
HostbasedAuthentication no
IgnoreRhosts yes
PermitEmptyPasswords no
PasswordAuthentication yes
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
UsePAM yes
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
GatewayPorts no
X11Forwarding no
PrintLastLog yes
UsePrivilegeSeparation yes
PermitUserEnvironment no
ClientAliveInterval 900
ClientAliveCountMax 0
Banner /etc/issue
Subsystem sftp /usr/libexec/openssh/sftp-server
RhostsRSAAuthentication no
Compression delayed
KerberosAuthentication no
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
Macs hmac-sha2-512,hmac-sha2-256,hmac-sha1

/etc/sysconfig/network_scripts/ifcfg-em1
DEVICE=eth0
TYPE=Ethernet
UUID=.......e8e
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
NAME="System eth0"
IPV6_AUTOCONF=no
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=yes
IPADDR=192.168.1.31
PREFIX=24
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=4.4.4.4
HWADDR=...:A8

@lmeinecke
Copy link
Contributor

lmeinecke commented Apr 19, 2017 via email

@jlamb85
Copy link
Author

jlamb85 commented Apr 19, 2017

Did that and still have issue

@stephenwb
Copy link
Contributor

You have not posted the results from 'ssh -vv 192.168.1.31' from the other subnet, nor said whether there is anything useful/relevant in /var/log/secure.
What is the other subnet? Are other servers in the same subnet reachable through the 192.168.1.1 router?

@jlamb85
Copy link
Author

jlamb85 commented Apr 19, 2017

Can't post the results. It is on a secure network. Entry in /var/log/secure says Connection closed by 192.168.1.31 There are other machines reachable on that subnet from the subnet I am using to try to reach this machine

@lmeinecke
Copy link
Contributor

lmeinecke commented Apr 19, 2017 via email

@johncolley
Copy link

johncolley commented Apr 20, 2017

Im thinking the route from the ssh server you are attempting to connect to is not in place.
$ netstat -r
$ route
either command will reveal the routing table on the ssh server.
can you ping the remote system from the ssh server?

other points of interest but not necessary yet:

/etc/ssh/sshd_config
remove 128-cbc,3des-cbc,aes192-cbc,aes256-cbc cyphers

/etc/sysconfig/network_scripts/ifcfg-em1
NM_CONTROLLED=no

@stephenwb
Copy link
Contributor

@jlamb85 Did you get it to work? If you no longer have the problem then you should close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants