I'm having some weird issue that I cannot understand (I'm trying to ssh to alexus and according to ssh it tells me it cannot resolve, yet when i use host to resolve it resolves w/out any issues:  mbp:~ alexus$ ssh -v alexus OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1: Reading configuration data /Users/alexus/.ssh/config debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: Applying options for * debug1: /etc/ssh_config line 53: Applying options for * ssh: Could not resolve hostname alexus: nodename nor servname provided, or not known mbp:~ alexus$ host alexus alexus.XXXXXXXXX.org is an alias for XXX.XXXXXXXXX.org. XXX.XXXXXXXXX.org has address 10.XX.XXX.XXX mbp:~ alexus$   How do I troubleshoot this issue?
122416
We have a linux box (called jumper) that is used to access servers in a few separate DMZs. Each DMZ has its own subdomain name (e.g. idmz.example.org, jdmz.example.org), and each subdomain has its own authoritative name server.  We're in the process of replacing the old Solaris jumper with a new Linux box. Most things have worked well, but we have a problem with connecting to servers in the subdomain idmz.example.com using SSH. Ping works fine; we can resolv the name using dig, but SSH says "Could not resolve".  Name resolution works well on the server side, and when we connect using the IP address there is no delay or timeout. But SSH on the client side claims to not be able to resolve the server.  Ping and failed SSH connection:  jenny@jumper$  ping server.idmz.example.com PING server.idmz.example.com (192.168.1.3) 56(84) bytes of data.  jenny@jumper$  ssh -v server.idmz.example.com OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * ssh: Could not resolve hostname server.idmz.example.com: Name or service not known   Successful SSH connection using IP instead of host name:  jenny@jumper$  ssh 192.168.1.3 jenny@192.168.1.3's password:    The one difference I can see from the client side is that I can't get an authoritative answer from the name servers for idmz, but I do get it from all the other DMZ domains.
26522
There are a few SSH destinations I will frequently be connecting to and I'm wondering if rather than remember the IP address I can create a host alias for them.  I'd like to be able to use...  ssh -p xx user@domain.ssh  I've tried establishing this host in /etc/hosts and unless there's a service I needed to restart it had no effect.
72372
I just installed Ubuntu. How do I set it up to allow me to ssh into it?  Right now I get "ssh: connect to host x.x.x.x port 22: Operation timed out".
9595
I'm on Fedora 19 and I have a problem with ssh.  Ssh is up and running and I can connect when I enter my lan ip. But when I try my server name (blahblah.no-ip.org) I get a connection refused. No-ip is already running as a service and is working properly (sending the correct ip).  I've already set up port forwarding on my router, I also changed the port of ssh both on the service and on the router port forwarding (in case my beloved ISP decided to block those ports). But still I get a connection refused and when I nmap the hostname I see that the ssh port is closed.  One thing though: I have two PCs under the same external ip (I've set up the port forwarding to the correct internal ip). When I nmap blahblah.no-ip.org I get a Port 23 and 80 open. 80 seems OK but I've never started telnet service on my machine.  Any ideas what else to try? Router is zte zxv10 and port forwarding is correctly set up. I say this because I've already set up port forwarding for deluge and it's working properly.
102570
We have tried both the /etc/hosts and also /etc/sysconfig/network. Edited both files and service network restart. Yet the hostname is showing as localhost.localdomain. How to resolve on this? Googling almost all talking about the same method too.
116590
When trying to SSH into a particular Mac machine it gives me the following error :  ssh_exchange_identification: Connection closed by remote host   I have done some google searches on the issue but I haven't seem to find a definite answer. I did notice that on the machine that I am trying to SSH into, it does not have the ~/.ssh file even on there so I went ahead and created it and gave it correct permissions but that didn't help. Here is the verbose of when attempting to SSH into it:  penSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: Applying options for * debug1: Connecting to &lt;ComputerName&gt; [xxx.xxx.xxx.xxx] port 22. debug1: Connection established. debug1: identity file /Users/&lt;UserName&gt;/.ssh/id_rsa type 1 debug1: identity file /Users/&lt;UserName&gt;/.ssh/id_rsa-cert type -1 debug1: identity file /Users/&lt;UserName&gt;/.ssh/id_dsa type -1 debug1: identity file /Users/&lt;UserName&gt;/.ssh/id_dsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.2 ssh_exchange_identification: Connection closed by remote host   Any ideas on how to get SSH working?
13497
Here are details of the machine I want to access using its hostname:  $ hostname hostname $ cat /etc/hosts 127.0.0.1   localhost 127.0.1.1   hostname.company.local  hostname   It's a default Debian 6 (Squeeze) install, so I didn't fiddle with anything yet.  This is what I get from a machine (running Debian Unstable) trying to access above machine:  $ ping hostname ping: unknown host hostname $ ping hostname.company.local ping: unknown host hostname.company.local $ cat /etc/resolv.conf nameserver 192.168.2.21 nameserver 192.168.2.51 search company.local
84268
Ubuntu 12.10 I'll explain the first problem. Sometimes when I load a webpage it never finishes loading and it says cannot reach server or something like that. When I ping that website, the terminal says it cannot resolve the hostname. So I then tried Google's DNS servers but had no luck there. It's weird because I've never had this problem in Windows 7. I used cat /etc/resolv.conf  and it came up with this: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.1.1 search hsd1.or.comcast.net  Why would it use 127.0.1.1? Does that mean it's trying to resolve addresses locally? When I ping the comcast search server I get a timeout error.
726
I'm having some issues SSH'ing to a server when logged into a particular VM.  From my local PC, I can log in to the server just fine using the command ssh -i .ssh/[my private key] username@domain.  If I then SSH into another unrelated server which also has the same private key and run the above command it will also log in just fine in to the server.  But, when I SSH into a particular OpenStack VM (again has the same private key) on the unrelated server and then SSH in to the server from there I start getting prompted for a passphrase. But a passphrase hasn't been set for the key so inevitably I get a "Permission denied (publickey)." error.  To double check, I removed the private key from the VM and scp'd the private key from my PC into it again and tried the same command I still get prompted for a passphrase.  In other words:   PC - SSH - Server1 = Works fine  PC - SSH - Server2 - SSH - Server1 =     Works fine  PC - SSH - Server2 - SSH - Virtual Machine - SSH - Server 1 =         Asks for a passphrase   What could be the reason behind this? It's definitely the right private key I'm using and it has the appropriate permissions.  Edit - Output of ssh -v -i .ssh/[my private key] username@domain as requested  OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 58: Applying options for * debug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 22. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file /.ssh/[my private key].ppk type -1 debug1: key_load_public: No such file or directory debug1: identity file /.ssh/[my private key].ppk-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.4 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.4 debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4 pat OpenSSH* compat 0x04000000 debug1: Authenticating to xxx.xxx.xxx.xxx:22 as '[my username]' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256@libssh.org debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server-&gt;client cipher: chacha20-poly1305@openssh.com MAC: &lt;implicit&gt; compression: none debug1: kex: client-&gt;server cipher: chacha20-poly1305@openssh.com MAC: &lt;implicit&gt; compression: none debug1: kex: curve25519-sha256@libssh.org need=64 dh_need=64 debug1: kex: curve25519-sha256@libssh.org need=64 dh_need=64 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:ZiugTjR5fM0E3evOwHoePFKspDQChA0Ab6L0q88KP/g debug1: Host 'xxx.xxx.xxx.xxx' is known and matches the ECDSA host key. debug1: Found key in /home/centos/.ssh/known_hosts:2 debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after 134217728 blocks debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=&lt;rsa-sha2-256,rsa-sha2-512&gt; debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /.ssh/[my private key].ppk Enter passphrase for key '/.ssh/[my private key].ppk': Enter passphrase for key '/.ssh/[my private key].ppk': Enter passphrase for key '/.ssh/[my private key].ppk': debug1: No more authentication methods to try. Permission denied (publickey).
70727
I can't connect to  or  &mdash; the initial connection times out every time. I check this every week, and it worked fine last time, so it must be something pretty recent. (Further HTTPS deployment?)
45425
Along side the question "" that explained the programical aspects of the error and suggested some workarounds, I want to know: what does this error mean?   X is not in the sudoers file.  This incident will be reported.   The former part of the error explains, clearly, the error. But the second part says that "This error will be reported"?! But why? Why the error will be reported and where? To whom? I'm both user and administrator and didn't receive any report :)!
6238
My DNS server is 192.168.1.152.  This DNS is provided to clients by DHCP. The windows clients on my LAN resolve names properly using that DNS, but my Ubuntu VM doesn't.  The VM is set up with bridge networking and is being properly provided the DNS server, but my local hostnames aren't being resolved by nslookup or browsers.  Here is an nslookup of one of my local domains:  # nslookup unraid.local Server:     127.0.0.53 Address:    127.0.0.53#53  ** server can't find unraid.local: SERVFAIL   Here is what it should resolve by using my DNS server:  # nslookup unraid.local 192.168.1.152 Server:     192.168.1.152 Address:    192.168.1.152#53  Name:   unraid.local Address: 192.168.1.152   /etc/resolv.conf has a wrong nameserver:  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN # 127.0.0.53 is the systemd-resolved stub resolver. # run "systemd-resolve --status" to see details about the actual nameservers.  nameserver 127.0.0.53   I ran that command. Under DNS Servers, confusingly, it specifies the correct server (and my default gateway).  root@ubuntu:~# systemd-resolve --status Global           DNSSEC NTA: 10.in-addr.arpa                       16.172.in-addr.arpa                       168.192.in-addr.arpa                       17.172.in-addr.arpa                       18.172.in-addr.arpa                       19.172.in-addr.arpa                       20.172.in-addr.arpa                       21.172.in-addr.arpa                       22.172.in-addr.arpa                       23.172.in-addr.arpa                       24.172.in-addr.arpa                       25.172.in-addr.arpa                       26.172.in-addr.arpa                       27.172.in-addr.arpa                       28.172.in-addr.arpa                       29.172.in-addr.arpa                       30.172.in-addr.arpa                       31.172.in-addr.arpa                       corp                       d.f.ip6.arpa                       home                       internal                       intranet                       lan                       local                       private                       test  Link 2 (ens33)       Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6        LLMNR setting: yes MulticastDNS setting: no       DNSSEC setting: no     DNSSEC supported: no          DNS Servers: 192.168.1.152                       192.168.1.1   I don't want to "hard code" the DNS server's IP in a config file because I won't be able to resolve when I change networks.  How can I get resolvconf and NetworkManager to automatically set the DHCP server's IP in /etc/resolv.conf?
91457
I run a web app in one of my lab servers, and I have already setup X11 Forwarding on those machines. Other lab members can tunnel through SSH, and browse that web app on their local browser at home.  I can't. Last time I checked with them, there is almost nothing I need to do.  When I type 192.168.1.113/webapp I get nothing.   Any tips?  THanks.    I ended up using the second method :)  ssh -L 8080:&lt;server-ip-address&gt;:80 &lt;username&gt;@&lt;remote-addr&gt; -N
123056
I need to start by stating that I have read through every single problem on here relating to mine, but all of them seem to have access somehow to their server's files. I do not, so here is my question.  I'm on centOS 6.5 and ssh closes connection right after a successful login. I am using mac and windows/putty to access my server with the same results. Is there anyway I can access my server now without having access to its files?   Below is the readout from ssh -vvv right after a successful login:  debug1: Authentication succeeded (password). Authenticated to 4X.5X.XX.2 ([4X.5X.XX.2]:82). debug1: channel 0: new [client-session] debug3: ssh_session2_open: channel_new: 0 debug2: channel 0: send open debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug2: callback start debug2: fd 3 setting TCP_NODELAY debug3: ssh_packet_set_tos: set IP_TOS 0x10 debug2: client_session2_setup: id 0 debug2: channel 0: request pty-req confirm 1 debug1: Sending environment. debug3: Ignored env TERM_PROGRAM debug3: Ignored env SHELL debug3: Ignored env TERM debug3: Ignored env TMPDIR debug3: Ignored env Apple_PubSub_Socket_Render debug3: Ignored env TERM_PROGRAM_VERSION debug3: Ignored env TERM_SESSION_ID debug3: Ignored env USER debug3: Ignored env SSH_AUTH_SOCK debug3: Ignored env __CF_USER_TEXT_ENCODING debug3: Ignored env PATH debug3: Ignored env PWD debug1: Sending env LANG = en_US.UTF-8 debug2: channel 0: request env confirm 0 debug3: Ignored env XPC_FLAGS debug3: Ignored env XPC_SERVICE_NAME debug3: Ignored env SHLVL debug3: Ignored env HOME debug3: Ignored env LOGNAME debug3: Ignored env _ debug2: channel 0: request shell confirm 1 debug2: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768 debug2: channel_input_status_confirm: type 99 id 0 debug2: PTY allocation request accepted on channel 0 debug2: channel 0: rcvd adjust 2097152 debug2: channel_input_status_confirm: type 99 id 0 debug2: shell request accepted on channel 0 Last login: Wed Oct  7 06:23:21 2015 from 1XX.XXX.X1.185 debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0 debug2: channel 0: rcvd eow debug2: channel 0: close_read debug2: channel 0: input open -&gt; closed debug2: channel 0: rcvd eof debug2: channel 0: output open -&gt; drain debug2: channel 0: obuf empty debug2: channel 0: close_write debug2: channel 0: output drain -&gt; closed debug2: channel 0: rcvd close debug3: channel 0: will not send data after close debug2: channel 0: almost dead debug2: channel 0: gc: notify user debug2: channel 0: gc: user detached debug2: channel 0: send close debug2: channel 0: is dead debug2: channel 0: garbage collecting debug1: channel 0: free: client-session, nchannels 1 debug3: channel 0: status: The following connections are open:   #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)  Connection to 4X.5X.XX.2 closed. Transferred: sent 3176, received 2640 bytes, in 0.3 seconds Bytes per second: sent 10370.6, received 8620.4 debug1: Exit status 254
102193
There are tons of questions about changing a Mac hostname, and while I went through most of them, I could never find this nuanced answer:  Why do routers always seems to receive the first hostname that was ever set to a machine? Let me show you with these screenshots how this Mac is supposedly correctly setup according to various answers on this site:     Now, when i set up this computer years ago, I think I chose the hostname david-MBP, and this seems to be what various routers get to this day and sometimes return to the Mac for localhost operations. Later I changed it with the various Terminal commands, and the Mac knows it, but it seems to stick around when communicating with routers.     So now my question is where do OS X keep this old value? Because since I connected with this router in the screenshot above, I never had that hostname, so it's no DHCP cache or anything like that.
26117
Let's say I have a key for Github, along with other keys. I've added lots of keys to my ssh agent (ssh-add -L returns lots of lines) at my home computer A. In my .ssh/config I have set up which key to use with which host, so e.g.  ssh -T -vvv git@github.com 2&gt;&amp;1 | grep Offering   gives  debug1: Offering RSA public key: /Users/doxna/.ssh/id_rsa.github   Only one key is offered, as expected. But then ssh-ing to some host B with ForwardAgent yes and repeating the same command, I get  debug1: Offering RSA public key: /Users/doxna/.ssh/id_rsa.linode2 debug1: Offering RSA public key: /Users/doxna/.ssh/id_rsa.helium debug1: Offering RSA public key: /Users/doxna/.ssh/id_rsa.github   meaning it tries all my keys. This is problematic since only a limited number of keys can be tried before servers return Too many authentication failures. So I tried editing .ssh/config on host B to include  Host github.com   IdentityFile /Users/doxna/.ssh/id_rsa.github   IdentitiesOnly yes   but then I get no key offerings, but rather  debug2: key: /Users/doxna/.ssh/id_rsa.github ((nil))   which I guess means that the key was not found(?) And after all, the key is located at my home computer A, not host B, so the question is how to refer to it at host B? Hope I managed to explain the question.
40966
So here's the problem:   I have a single server with multiple hostnames, meaning I have A records example.com and *.example.com pointing to the server's ip-address I want to limit incoming ssh connections to a specific hostname, that is I want to allow only logins to user@secret.example.com, and disallow login attempts using user@ip-address or user@example.com   The man page from sshd_config has the following for ListenAddress:  Specifies the local addresses sshd(8) should listen on.   The following forms may be used:  ListenAddress host|IPv4_addr|IPv6_addr ListenAddress host|IPv4_addr:port ListenAddress [host|IPv6_addr]:port   which seems to indicate that sshd has the ability to restrict itself to a a specific hostname. However I've tried ListenAddress secret.example.com:22, but after restarting sshd that doesn't seem to add any restrictions based on hostname used.  man sshd_config doesn't seem to show any other options in that vein.  Is there something I'm missing, or does sshd simply not have that ability?