ssh problems
I have problems connecting through ssh. I followed the tutorials and set-up shh on my ubuntu 9.04; however, when i try to connect through ssh it either just stalls but the cursor is still blinking or gives me this error: ssh: Could not resolve hostname ... Name or service not known. Am i doing something wrong? I have the same problem with telnet. What could be the problem?
|
Try connecting to the IP address instead of the name.
|
Quote:
jdk |
Quote:
Way to use ssh : ssh username@ipaddress then It will ask for password of username...and also username should not block ssh services in his/her firewall....hope ur sshd demon running... can u give some more information about ur login..how u tried?? command used etc?? |
this is what my terminal is shwing yuri@yuri-desktop:~$ ssh -l yuri -p 23 127.0.0.1 and then nothing. the cursor goes on the next line and just keeps blinking
|
Are both machines local? You can change the "useDNS" config setting to no in /etc/ssh/sshd_conf. If you only have a few hosts on your LAN, you could instead add them to the /etc/hosts file of the ssh server. At the ssh server, run
getent hosts <remote hostname> to check if you can resolve these local addresses. Also:
|
Quote:
127.0.0.1 <tab> yuri now try : ssh yuri@localhost this should work and also check whether your firewall is blocking ssh i.e, port 23 is open..In my system ssh is working on port 22....still any issues let us know... |
what does DNS config setting no mean?
|
Quote:
127.0.0.1 <tab> localhost this is probably in there. But maybe not. -v will give you more info on what's going on hopefully. Also tail your secure log or where you sshd logs to. Then try ssh -v -p 23 yuri@127.0.0.1 If none of this is working post the result of: Code:
cat /etc/ssh/sshd_config | grep ^# | grep . |
I don't have an etc/hosts file
|
The /etc/hosts file you need for this problem is in the ssh server. However it is odd not to have an /etc/hosts file on any of your hosts, because at least localhost should be listed in it.
Code:
# Code:
/etc/HOSTNAME |
1. /etc/hosts is a default file in all Linux distros.
2. ssh runs on port 22 by default, so use that one unless you have edited the sshd_config file 3. run 'iptables -Ln' to see if firewall is blocking the cxn. 4. use 'ps -ef|grep sshd' to check if ssh daemon is up |
OK, i found my local hosts file. what does DNS - setting no do? and how do i check my ssh dameon?
|
Thanks for all the help, i tried telnet> open -l username -a host port and it says: Trying and an ip address but connection just timed out so i guess i can't establish a three-way-handshake could it be that my isp doesn't allow telnet or ssh usage?
|
Just enter "telnet <hostname> 22". You don't want to use the telnet protocol. You want to use the telnet client to test the connection on port 22.
For the UseDNS question. Please see the sshd_config manpage. If you don't have a domain name, performing a dns lookup can cause a delay. I doubt that your ISP blocks port 22. |
All times are GMT -5. The time now is 08:37 PM. |