Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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?
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?
What exactly are you trying to connect to? Whatever hostname you entered could not be resolved (converted to an ip number) by your system. That would also account for your telnet problem as well. Do you have a dns server running? Are you giving ssh a correct hostname - one that you know exists? no mispellings?
jdk
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?
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:
try "ssh -vv user@hostname" to provide verbose information on what the problem might be.
Check the firewall on the remote host. It could be blocking the port.
If you changed the port that ssh answers, you need to use the same port number when you use the client. You also need to open the same port in the servers firewall instead of 22.
Check if the ssh daemon is running on the remote server.
Check the logs on the remote server. It could indicate what the failure is. This doesn't look like an authentication failure however.
For a quick connectivity check you can run "telnet hostname 22". You won't get further than that, but if you see "ssh <version>", You have connectivity and the service is running.
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
ok fine...do one thing add yuri in /etc/hosts file as follows
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...
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:
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#
127.0.0.1 localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
The original /etc/hosts file should have been supplied by the "netcfg" package. This package also supplies other network configuration files as well
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
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.