All Forums |
Register |
Login |
Search |
Subscriptions |
My Profile |
Inbox |
Tool Warehouse |
FAQs |
Resources |
Help |
Member List |
Address Book |
Logout |
|
|
ssh and hostname
|
Logged in as: Guest |
Users viewing this topic: none |
|
Login  |
|
|
ssh and hostname - Jan. 14, '05, 6:22:45 AM
|
|
|
NoelM
Posts: 16
Joined: Jan. 7, '05,
Status: offline
|
I am novice in ssh on SFU and don't understand why, when I use the numeric IP address in ssh command, it works, and when I use the hostname declared in /etc/hosts it does not work ("ping machine" is ok).
For example :
# ssh noel@machine myproc
ssh: machine: unknown name or service
# ssh -l noel machine myproc
ssh: machine: unknown name or service
I suppose I have forgotten something...
Thanks.
|
|
|
RE: ssh and hostname - Jan. 14, '05, 11:30:09 AM
|
|
|
Rodney
Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
Because the lookup is through the DNS service.
A numeric id doesn't need to be translated to be used.
A hostname is looked up and then translated to the numeric id.
|
|
|
RE: ssh and hostname - Jan. 17, '05, 2:41:33 AM
|
|
|
NoelM
Posts: 16
Joined: Jan. 7, '05,
Status: offline
|
Do you mean that ssh command only uses DNS service, so that it is not possible to resolve the address using only the "/etc/hosts" file ?
|
|
|
RE: ssh and hostname - Jan. 17, '05, 2:12:44 PM
|
|
|
Rodney
Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
By default things are configured to use DNS only.
The /etc/hosts file is ignored unless there is direction to use it.
The old way was using /etc/resolv.conf with the "lookup" directive.
But that went away a long time ago (with the official BIND releases).
You'll notice there is no "lookup" directive in the resolv.conf man page.
The file that tells the direction(s) to look is "/etc/irs.conf". So for
a local lookup of hosts in addition to DNS you would have a content of:
# Hosts comes first from DNS, failing that, the local file
hosts dns continue
hosts local
|
|
|
RE: ssh and hostname - Jan. 17, '05, 2:27:59 PM
|
|
|
Rodney
Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
BTW, to answer a related question which can appear with this.
The utility nslookup does it's lookup just by DNS and
doesn't do a local lookup because it uses the API getaddrinfo()
instead of, gethostbyname(). Ssh does call gethostbyname()
so the /etc/irs.conf file "hosts" directive is followed.
Also, the file /etc/hosts needs to be with Unix line endings.
You can do this by using the utility flip.
|
|
|
RE: ssh and hostname - Jan. 18, '05, 6:11:18 AM
|
|
|
NoelM
Posts: 16
Joined: Jan. 7, '05,
Status: offline
|
Thanks a lot Rodney, I have so many things to learn !
Just a remark : By default, /etc/hosts is a link to /dev/fs/C/WINNT/system32/drivers/etc/hosts. It works fine after using flip to transform CRLF in LF, but after, when I modify the file in Windows environment using notepad for example, the file is with MSDOS line endings.
So, I think it is better to have two files (one for Windows, one for SFU) instead of a link.
|
|
|
RE: ssh and hostname - Jan. 18, '05, 6:44:42 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
I seem to have a similar issue - I'm trying to use ssh to connect to a remote machine. It connects well when I specify the IP , but fails to resolve the domain address- it says
quote:
ssh: Temporary fialure
Is it neccesary to install bind to solve this? If so why is it not in the dependancy for this package. Anyway I would prefere not to install it if it is to be used only by the ssh client because it's useless. All other apps (meaning links or ftp) work fine with domain names - so what's wrong?
On the other hand the error message seems different than the one that Noel had.
Here's the truss output
Welcome to the Interix UNIX utilities.
DISPLAY=localhost:0.0
Bash v3.00 Welcome to the world of colours...
root ~#>ssh wierzba.miks.uj.edu.pl
ssh: wierzba.miks.uj.edu.pl: temporary failure
root ~#>truss ssh wierzba.miks.uj.edu.pl
tracing pid 1733
getdata() getdata returned 0
getrlimit() getrlimit returned 0
pthread_inform_signals() pthread_inform_signals returned 0
unixpath2win() unixpath2win returned 0
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
open("/usr/local/lib/libcrypto.so", 0x1) open failed: errno 2, No such file or directory
open("/usr/local/ssl/lib/libcrypto.so", 0x1) open returned 3
read(3, 0x88EC18, 4096) read returned 4096 0x1000
close(3) close returned 0
unixpath2win() unixpath2win returned 0
open("/usr/local/lib/libcrypt.so", 0x1) open returned 3
read(3, 0x88EBF8, 4096) read returned 4096 0x1000
close(3) close returned 0
unixpath2win() unixpath2win returned 0
open("/usr/local/lib/libz.so", 0x1) open returned 3
read(3, 0x88EBD8, 4096) read returned 4096 0x1000
close(3) close returned 0
unixpath2win() unixpath2win returned 0
open("/usr/local/lib/libc.so.3.5", 0x1) open failed: errno 2, No such file or directory
open("/usr/local/ssl/lib/libc.so.3.5", 0x1) open failed: errno 2, No such file or directory
open("/usr/local/lib/libc.so.3.5", 0x1) open failed: errno 2, No such file or directory
open("/usr/local/ssl/lib/libc.so.3.5", 0x1) open failed: errno 2, No such file or directory
open("/usr/lib/libc.so.3.5", 0x1) open returned 3
read(3, 0x88EBB8, 4096) read returned 4096 0x1000
close(3) close returned 0
unixpath2win() unixpath2win returned 0
open("/usr/local/lib/libdl.so.3.5", 0x1) open failed: errno 2, No such file or directory
open("/usr/local/ssl/lib/libdl.so.3.5", 0x1) open failed: errno 2, No such file or directory
open("/usr/local/lib/libdl.so.3.5", 0x1) open failed: errno 2, No such file or directory
open("/usr/local/ssl/lib/libdl.so.3.5", 0x1) open failed: errno 2, No such file or directory
open("/usr/lib/libdl.so.3.5", 0x1) open returned 3
read(3, 0x88EB98, 4096) read returned 4096 0x1000
close(3) close returned 0
unixpath2win() unixpath2win returned 0
getids() getids returned 0
getids() getids returned 0
setids() setids returned 0
getpwuid(0x303EB, 0x0) getpwuid returned 0
umask() umask returned 18 0x12
isatty(0) isatty returned 0
open("/dev/fs/C/Documents and Settings/root/.ssh/config", 0x1) open failed: errno 2, No such file or directory
open("/usr/local/etc/ssh_config", 0x1) open returned 3
fstat(3, 0xBA0710, 0x0) fstat ret: 0 dev: 0x40000000000043 ino: 0x00006ade
isatty(3) isatty returned 0
read(3, 0x130098, 4096) read returned 1204 0x4B4
read(3, 0x130098, 4096) read returned 0
close(3) close returned 0
getids() getids returned 0
getids() getids returned 0
open("/dev/urandom", 0x1801) open returned 3
sysconf() sysconf returned 1024 0x400
select() select returned 0
read(3, 0x88FD10, 32) read returned 32 0x20
close(3) close returned 0
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
pthread_mutex_lock(0x45CBD0) pthread_mutex_init(0x45CBD0, 0x0) pthread_mutex_init returned 0
pthread_mutex_lock returned 0
pthread_mutex_unlock(0x45CBD0) pthread_mutex_unlock returned 0
open("/etc/irs.conf", 0x1) open failed: errno 2, No such file or directory
open("/etc/hesiod.conf", 0x1) open failed: errno 2, No such file or directory
getids() getids returned 0
open("/etc/resolv.conf", 0x1) open returned 3
fstat(3, 0xBA0710, 0x0) fstat ret: 0 dev: 0x40000000000043 ino: 0x0000e803
isatty(3) isatty returned 0
read(3, 0x17B0F8, 4096) read returned 110 0x6E
read(3, 0x17B0F8, 4096) read returned 0
close(3) close returned 0
open("/etc/services", 0x1) open returned 3
fcntl(3, 0x3, 0x1) fcntl returned 0
fstat(3, 0xBA0710, 0xB80710) fstat ret: 0 dev: 0x41010000000043 ino: 0x000008ef
isatty(3) isatty returned 0
read(3, 0x17B110, 4096) read returned 4096 0x1000
read(3, 0x17B110, 4096) read returned 3187 0xC73
read(3, 0x17B110, 4096) read returned 0
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
open("/etc/hosts", 0x1) open returned 3
fcntl(3, 0x3, 0x1) fcntl returned 0
fstat(3, 0xBA0710, 0x0) fstat ret: 0 dev: 0x41010000000043 ino: 0x000038e2
isatty(3) isatty returned 0
read(3, 0x17B110, 4096) read returned 270 0x10E
read(3, 0x17B110, 4096) read returned 0
lseek(3, 1, 0) lseek returned 0
lseek(3, 0, 270) lseek returned 0
lseek(3, 0, 0) lseek returned 0
read(3, 0x17B110, 4096) read returned 270 0x10E
read(3, 0x17B110, 4096) read returned 0
close(3) close returned 0
write(2, 0x88F490, 48) ssh: wierzba.miks.uj.edu.pl: temporary failure
write returned 48 0x30
exit(255) process exited with status 255
root ~#>
< Message edited by cortez_ -- Jan. 18, '05, 6:49:06 AM >
|
|
|
RE: ssh and hostname - Jan. 18, '05, 10:41:13 AM
|
|
|
Rodney
Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
> So, I think it is better to have two files (one for Windows, one for SFU) instead of a link.
What I will do is change BIND to read the /etc/hosts file with the MS-DOS line endings
without a problem. I've done this for some other packages as well.
This won't happen today (I'm fighting Active Directory today), but soonish.
|
|
|
RE: ssh and hostname - Jan. 18, '05, 10:45:12 AM
|
|
|
Rodney
Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
cortez_ writes:
> Is it neccesary to install bind to solve this?
No it's not.
The BIND package has just static binaries right now. So ssh and other
packages linked with libbind are static linked.
> All other apps (meaning links or ftp) work fine with domain names - so what's wrong?
They (i.e. ftp) are linked with the same BIND. The API's being used may be different.
But I haven't see this problem raised before. I'll look at the truss o/p for a bit.
|
|
|
RE: ssh and hostname - Jan. 18, '05, 3:00:46 PM
|
|
|
Rodney
Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
When I do:
ssh wierzba.miks.uj.edu.pl
I can connect without a problem to the ssh server there.
If I stop the DNS lookup in /etc/irs.conf I then get
"ssh: wierzba.miks.uj.edu.pl: no address associated with name".
Since you don't get this message (at least in the o/p given) I don't
think that this is a DNS problem. BY the looks of things the host was
found without a problem. The failure is with connect() and it
shows errno==49 (EADDRNOTAVAIL, Can't assign requested address). To
quote from the connect() man page this means "The specified address
is not available on this machine."
Is there a firewall between you and the ssh server?
In your services file does it have the right port number for ssh?
|
|
|
RE: ssh and hostname - Jan. 19, '05, 2:03:10 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
It might be an issue. I've tested this on another machine. Firstly I thought that the point might be that in the forst case I was remotely logged on, but that's not the issue. When I was using the old openssh-3.8 it worked OK locally and when remotely logged on. When I upgraded to the newest ssh 3.9.0.1.4 it fails both from local shell and form remote session.
The firewall might be an issue but why do all the things work fine in ssh 3.8 and fail in 3.9??
I didn't change any firewall rules either on production environment or on the testbed (these two are phisically on different networks). So maybe there is another reason (any changes done between 3.8.0.1.2 and 3.9.0.1.4 ??
Have a look:
user /interix_utils/packages#>pkg_info | grep ssh
openssh-3.8.0.1.2-bin version 3.8p1-2 (3.8.0.1.2) of OpenSSH for Interix 3.5
user /interix_utils/packages#>ls -l | grep ssh
-rwx------+ 1 gprzybylski Brak 1496488 Nov 18 17:13 openssh-3.9.0.1.1-bin.tgz
user /interix_utils/packages#>pkg_add poenssh*
can't find package 'poenssh*'
user /interix_utils/packages#>pkg_add openssh*
cat: cannot open file /var/run/syslog.pid : No such file or directory
usage: kill -s sig pid ...
kill -sig pid ...
kill -l [exit_status]
kill -m
cat: cannot open file /var/run/syslog.pid : No such file or directory
syslogd started
pkg_add(openssh-3.9.0.1.4-bin): other version 'openssh-3.8.0.1.2-bin' already in
stalled
pkg_add(openssh-3.9.0.1.4-bin): proceeding to install newer version
pkg_add(openssh-3.9.0.1.4-bin): proceeding to uninstall older version first
/usr/local/etc/ssh_host_key already exists, skipping.
/usr/local/etc/ssh_host_dsa_key already exists, skipping.
/usr/local/etc/ssh_host_rsa_key already exists, skipping.
/usr/local/etc/ssh_host_key already exists, skipping.
/usr/local/etc/ssh_host_dsa_key already exists, skipping.
/usr/local/etc/ssh_host_rsa_key already exists, skipping.
user /interix_utils/packages#>pkg_info | grep ssh
openssh-3.9.0.1.4-bin Version 3.9.0.1.4 of openssh for Interix 3.5.
user /interix_utils/packages#>ssh wierzba.miks.uj.edu.pl
ssh: wierzba.miks.uj.edu.pl: temporary failure
user /interix_utils/packages#>
The /etc/services links to the windows file, it does not have the port 22 set by default (but this does not prevent old ssh from running. I've specified/added the ssh line in this file manually but it din't change the behaviour at all.
I've noticed that truss reports some shared libs are to be loaded but fail - might that be the reason?
< Message edited by cortez_ -- Jan. 19, '05, 2:19:35 AM >
|
|
|
RE: ssh and hostname - Jan. 24, '05, 3:18:59 PM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
Just reminding myself - have you happen to look through it?
|
|
|
RE: ssh and hostname - Feb. 18, '05, 9:05:02 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
I did some more digging and here are the results:
1. Rodney said that he was unable to replicate the problem, I found that the change happened with the upgrade from 3.8 to 3.9.0.1 - maybe it's connected with changes to some libs?? I replicated the problem on two other machines.
2. My packages installed are:
apropos-1.0-bin Version 1.0 of apropos for Interix 3.5.
bash-2.05.2.2-bin Version 2.05.2.2 of bash for Interix 3.5.
cabextract-1.1-bin Version 1.1 of cabextract for Interix 3.5.
ccache-2.3-bin Version 2.3 of ccache for Interix 3.5.
cmatrix-1.2a-bin Version 1.2a of cmatrix for Interix 3.5.
env_cflags_gcc-1.0.1-bin Version 1.0.1 of env_cflags_gcc for Interix 3.5.
env_cppflags_local-1.2-bin Version 1.2 of env_cppflags_local for Interix 3.5.
env_cppflags_ssl-1.1-bin Version 1.1 of env_cppflags_ssl for Interix 3.5.
env_ldflags_local-1.0.2-bin Version 1.0.2 of env_ldflags_local for Interix 3.5.
env_ldflags_ssl-1.0.1-bin Version 1.0.1 of env_cflags_gcc for Interix 3.5.
env_ldlibrarypath_local-1.0.1-bin Version 1.0.1 of env_ldlibrarypath_local for I
nterix 3.5.
env_ldlibrarypath_ssl-1.0.1-bin Version 1.0.1 of env_cflags_gcc for Interix 3.5.
env_manpath_local-1.0.1-bin Version 1.0.1 of env_manpath_local for Interix 3.5.
env_manpath_localshare-1.0.1-bin Version 1.0.1 of env_manpath_localshare for Int
erix 3.5.
env_manpath_ssl-1.0.1-bin Version 1.0.1 of env_manpath_ssl for Interix 3.5.
env_path_local-1.0.1-bin Version 1.0.1 of env_path_local for Interix 3.5.
free-0.9-bin Version 0.9 of free for Interix 3.5.
ftp-3.4-bin Version 3.4 of ftp for Interix 3.5.
gettext-0.14.1.7-bin Version 0.14.1.7 of gettext for Interix 3.5.
glib-2.4.0.3-bin Version 2.4.0.3 of glib for Interix 3.5.
groff-1.17.2.2-bin Version 1.17.2.2 of groff for Interix 3.5.
jpeg-6b.3-bin Version 6b.3 of jpeg for Interix 3.5.
lha-1.14c-bin Version 1.14c of lha for Interix 3.5.
libcrypt-1.2.4-bin Version 1.2.4 of libcrypt for Interix 3.5.
libiconv-1.9.2.3-bin Version 1.9.2.3 of libiconv for Interix 3.5.
libncurses-5.4-bin Version 5.4 of libncurses for Interix 3.5
libpng-1.2.7-bin Version 1.2.7 of libpng for Interix 3.5.
libtool-1.5.6-bin GNU Libtool 1.5.6 for Interix.
links-2.1pre15-1.1-bin Version 1.1 of links-2.1pre15 for Interix 3.5.
ls-1.1-bin Version 1.1 of ls for Interix 3.5.
man-1.0-bin Version 1.0 of man for Interix 3.5.
mc-4.6.0-bin Version 4.6.0 of mc for Interix 3.5.
mysql-client-4.1.7-bin Version 4.1.7 of mysql-client for Interix 3.5.
openssh-3.9.0.1.4-bin Version 3.9.0.1.4 of openssh for Interix 3.5.
openssl-0.9.7d.3-bin Version 0.9.7d.2 of openssl for Interix 3.5.
passwd-1.0-bin Version 1.0 of passwd for Interix 3.5.
pax-1.3-bin Version 1.3 of pax/tar for Interix 3.5.
pkg-1.7-bin Version 1.7 of pkg for Interix 3.5.
pkgconfig-0.15.0.1-bin Version 0.15.0.1 of pkgconfig for Interix 3.5.
rman-3.2-1.1-bin Version 1.1 of rman-3.2 for Interix 3.5.
stat-1.0.1-bin Version 1.0.1 of stat for Interix 3.5.
syslogd-1.1-bin Version 1.1 of syslogd for Interix 3.5.
tcl-8.4.6.1-bin Version 8.4.6.1 of tcl for Interix 3.5.
tiff-3.5.7.5-bin Version 3.5.7.5 of tiff for Interix 3.5.
tk-8.4.6.1-bin Version 8.4.6.1 of tk for Interix 3.5.
tkman-2.2-1.0-bin Version 1.0 of tkman-2.2 for Interix 3.5.
unzip-5.51-bin Version 5.51 of unzip for Interix 3.5.
uptime-1.0-bin Version 1.0 of uptime for Interix 3.5.
vim-6.3-bin Version 6.3 of vim for Interix 3.5.
whatis-1.0-bin Version 1.0 of whatis for Interix 3.5.
which-2.16-bin Version 2.16 of which for Interix 3.5.
zlib-1.1.4e-bin Version 1.1.4e of zlib for Interix 3.5.
zoo-2.1-bin Version 2.1 of zoo for Interix 3.5.
3. I did truss on ssh and here what it produced:
gprzybylski ~#>truss ssh wierzba.miks.uj.edu.pl
tracing pid 1027
getdata() getdata returned 0
getrlimit() getrlimit returned 0
pthread_inform_signals() pthread_inform_signals returned 0
unixpath2win() unixpath2win returned 0
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
open("/usr/local/lib/libcrypto.so", 0x1) open failed: errno 2, No such file or d
irectory
open("/usr/local/ssl/lib/libcrypto.so", 0x1) open returned 3
read(3, 0x88EC18, 4096) read returned 4096 0x1000
close(3) close returned 0
unixpath2win() unixpath2win returned 0
open("/usr/local/lib/libcrypt.so", 0x1) open returned 3
read(3, 0x88EBF8, 4096) read returned 4096 0x1000
close(3) close returned 0
unixpath2win() unixpath2win returned 0
open("/usr/local/lib/libz.so", 0x1) open returned 3
read(3, 0x88EBD8, 4096) read returned 4096 0x1000
close(3) close returned 0
unixpath2win() unixpath2win returned 0
open("/usr/local/lib/libc.so.3.5", 0x1) open failed: errno 2, No such file or di
rectory
open("/usr/local/ssl/lib/libc.so.3.5", 0x1) open failed: errno 2, No such file o
r directory
open("/usr/local/lib/libc.so.3.5", 0x1) open failed: errno 2, No such file or di
rectory
open("/usr/local/ssl/lib/libc.so.3.5", 0x1) open failed: errno 2, No such file o
r directory
open("/usr/lib/libc.so.3.5", 0x1) open returned 3
read(3, 0x88EBB8, 4096) read returned 4096 0x1000
close(3) close returned 0
unixpath2win() unixpath2win returned 0
open("/usr/local/lib/libdl.so.3.5", 0x1) open failed: errno 2, No such file or d
irectory
open("/usr/local/ssl/lib/libdl.so.3.5", 0x1) open failed: errno 2, No such file
or directory
open("/usr/local/lib/libdl.so.3.5", 0x1) open failed: errno 2, No such file or d
irectory
open("/usr/local/ssl/lib/libdl.so.3.5", 0x1) open failed: errno 2, No such file
or directory
open("/usr/lib/libdl.so.3.5", 0x1) open returned 3
read(3, 0x88EB98, 4096) read returned 4096 0x1000
close(3) close returned 0
unixpath2win() unixpath2win returned 0
getids() getids returned 0
getids() getids returned 0
setids() setids returned 0
getpwuid(0x303EB, 0x0) getpwuid returned 0
umask() umask returned 18 0x12
isatty(0) isatty returned 0
open("/dev/fs/C/Documents and Settings/gprzybylski/.ssh/config", 0x1) open faile
d: errno 2, No such file or directory
open("/usr/local/etc/ssh_config", 0x1) open returned 3
fstat(3, 0xA90710, 0xA10710) fstat ret: 0 dev: 0x40000000000043 ino: 0x00009f61
isatty(3) isatty returned 0
read(3, 0x12FFD8, 4096) read returned 1204 0x4B4
read(3, 0x12FFD8, 4096) read returned 0
close(3) close returned 0
getids() getids returned 0
getids() getids returned 0
open("/dev/urandom", 0x1801) open returned 3
sysconf() sysconf returned 1024 0x400
select() select returned 0
read(3, 0x88FD10, 32) read returned 32 0x20
close(3) close returned 0
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
getids() getids returned 0
pthread_mutex_lock(0x45ABD0) pthread_mutex_init(0x45ABD0, 0x0) pthread_mutex_ini
t returned 0
pthread_mutex_lock returned 0
pthread_mutex_unlock(0x45ABD0) pthread_mutex_unlock returned 0
open("/etc/irs.conf", 0x1) open failed: errno 2, No such file or directory
open("/etc/hesiod.conf", 0x1) open failed: errno 2, No such file or directory
getids() getids returned 0
open("/etc/resolv.conf", 0x1) open returned 3
fstat(3, 0xA90710, 0xA10710) fstat ret: 0 dev: 0x40000000000043 ino: 0x00013bfb
isatty(3) isatty returned 0
read(3, 0x17B040, 4096) read returned 111 0x6F
read(3, 0x17B040, 4096) read returned 0
close(3) close returned 0
open("/etc/services", 0x1) open returned 3
fcntl(3, 0x3, 0x1) fcntl returned 0
fstat(3, 0xA90710, 0xA10710) fstat ret: 0 dev: 0x41010000000043 ino: 0x000008eb
isatty(3) isatty returned 0
read(3, 0x17B090, 4096) read returned 4096 0x1000
read(3, 0x17B090, 4096) read returned 3187 0xC73
read(3, 0x17B090, 4096) read returned 0
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
close(3) close returned 0
open("/etc/hosts", 0x1) open returned 3
fcntl(3, 0x3, 0x1) fcntl returned 0
fstat(3, 0xA90710, 0xA10710) fstat ret: 0 dev: 0x41010000000043 ino: 0x00000152
isatty(3) isatty returned 0
read(3, 0x17B090, 4096) read returned 742 0x2E6
read(3, 0x17B090, 4096) read returned 0
lseek(3, 1, 0) lseek returned 0
lseek(3, 0, 742) lseek returned 0
lseek(3, 0, 0) lseek returned 0
read(3, 0x17B090, 4096) read returned 742 0x2E6
read(3, 0x17B090, 4096) read returned 0
close(3) close returned 0
write(2, 0x88F490, 48) ssh: wierzba.miks.uj.edu.pl: temporary failure
write returned 48 0x30
exit(255) process exited with status 255
Did you notice this part repeated several times:
close(3) close returned 0
socket() socket returned 3
connect() connect failed: errno 49, Can't assign requested address
It's the same issue I've seen with Midnight Commander delay. Looks suspicious and seems to be some external lib.
|
|
|
RE: ssh and hostname - Feb. 18, '05, 9:37:31 AM
|
|
|
Rodney
Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
The close/socket failures are happening between looking at /etc/resolv.conf and /etc/hosts.
That would imply to me that it's something in the BIND code. Maybe it can't connect
to the DNS server there? (Hence the lookup in /etc/hosts).
The two libraries that changed between 3.8 and 3.9 are the use of BIND and some libc
replacements. Assuming (for the heck of it right now) that it's in BIND right after
the /etc/resolv.conf being read then maybe something is getting mangled when the
address is read in the /etc/resolv.conf file.
So what's in the /etc/resolv.conf file on that machine right now?
Specifically, what does it look like in vi for line endings, non-ascii characters, etc. ?
|
|
|
RE: ssh and hostname - Feb. 18, '05, 10:30:31 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
gprzybylski ~#>cat /etc/resolv.conf
# This file was automatically generated on Wed Sep 22 06:03:55 GMT 2004
#
search
nameserver
lookup file bind
^?gprzybylski ~#>
The line endings seem to be ok. Actually I haven't touched this file ever since I'd installed the SFU
That's one machine that is connected to the network right now.
I'll check later on on the other machine which is currently unplugged.
Anyway I've checked and installing on unistalling BIND doesn't change anything in this behaviour.
The one thing that makes me suspicious is that on your platform it works fina and on my platforms it fails, so maybe checking for differences might help?
|
|
|
RE: ssh and hostname - Feb. 18, '05, 5:37:48 PM
|
|
|
Rodney
Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
Well, that's the problem there in /etc/resolv.conf.
There is no nameserver given and no search value.
Consult your other machine that is working and/or the man page "resolv.conf".
|
|
|
RE: ssh and hostname - Feb. 19, '05, 2:11:19 PM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
It's empty too. Actually it's empty by default and it NEVER caused any problem in any other app. Everything else works fine so I don't understand why in this particular case should I change anything here. Why can't it lookup the hostname like any other normaqll app does?
|
|
|
RE: ssh and hostname - Feb. 19, '05, 5:26:39 PM
|
|
|
Rodney
Posts: 2916
Joined: Jul. 9, '02,
From: /Tools lab
Status: offline
|
You need to tell it which DNS server to use.
At installation of SFU it was supposed to populate this file.
But something went awry. Normally it'll look something like:
# This file was automatically generated on Mon May 13 14:12:44 EDT 2002
#
search ruddock.org
nameserver 192.168.1.3
lookup file bind
This is how a normal Unix application does it.
|
|
|
RE: ssh and hostname - Feb. 21, '05, 2:10:56 AM
|
|
|
cortez_
Posts: 330
Joined: Mar. 27, '04,
From: Poland
Status: offline
|
When I put the dns IP into this file it works fine, BUT:
1. Why all other apps work great without that
2. I've been installing SFU on different computers and it NEVER got populates authomatically.
3. What if the DNS IP retrieved by DHCP on every interface startup? Maybe an authomatic script would do the trick?
|
|
|
RE: ssh and hostname - Feb. 21, '05, 10:04:15 AM
|
|
|
markfunk
Posts: 622
Joined: Mar. 31, '03,
Status: offline
|
1) Interix provides network api's that use Winsock.
Winsock does not use /etc/resolv.conf.
Most Interix utilities use the default network api's.
But there are UNIX libraries (like /usr/local/lib/bind/libbind.a)
that provide their own set of replacement network api's and these
tend to use config files like /etc/resolv.conf.
So if the Interix application you're using was built using
these alternate libraries (like /bin/nslookup), then
/etc/resolv.conf is important.
2) All installations of Interix (from SFU CD) will have /etc/resolv.conf
created automatically when the Interix subsystem is started for
the very first time. There is a script that runs that creates
and populates /etc/resolv.conf.
This script runs "ipconfig /all" and extracts information from this
output. The contents of /etc/resolv.conf are only as good as
the output from ipconfig.
3) If you're using DHCP and your network DNS values are always changing
then yes, you'll have to set something up on your machine to populate
your /etc/resolv.conf whenever its appropriate for you.
On the SFU3.5 CD (or any media), see the BaseUtils/etc/init.d/postinstall
script. This is where the commands are to populate /etc/resolv.conf.
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
|
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|
|