SSH Unable to resolve Hostname when using aliasHow to ssh to servers internally by hostname without domain...
Can't understand an ACT practice problem: Triangle appears to be isosceles, why isn't the answer 7.3~ here?
How to avoid a lengthy conversation with someone from the neighborhood I don't share interests with
Is Norway in the Single Market?
Does the problem of P vs NP come under the category of Operational Research?
Why is the Vasa Museum in Stockholm so Popular?
Who's behind community AMIs on Amazon EC2?
Accurately recalling the key - can everyone do it?
C# TCP server/client class
How long should I wait to plug in my refrigerator after unplugging it?
Is there a word that describes people who are extraverted and/or energetic, but uneducated, unintelligent and/or uncreative?
What is Albrecht Dürer's Perspective Machine drawing style?
“The Fourier transform cannot measure two phases at the same frequency.” Why not?
Ender 5: Bowden tube shifts in/out of extruder during retractions
Pronouns when writing from the point of view of a robot
What is the reason behind water not falling from a bucket at the top of loop?
How does shared_ptr<void> know which destructor to use?
Can you shove a friendly creature?
Declaring a visitor to the UK as my "girlfriend" - effect on getting a Visitor visa?
A wiild aanimal, a cardinal direction, or a place by the water
Is a switch from R to Python worth it?
Does a bard know when a character uses their Bardic Inspiration?
Why does the friction act on the inward direction when a car makes a turn on a level road?
Went to a big 4 but got fired for underperformance in a year recently - Now every one thinks I'm pro - How to balance expectations?
How to transform a function from f[#1] to f[x]
SSH Unable to resolve Hostname when using alias
How to ssh to servers internally by hostname without domain name?Alias not working with for loopFinding hostname to run SSHGit asks for password when using SSH URL, ssh does notFedora 28 - ssh - Could not resolve hostnamessh is unable to connect to server in VPNssh to another user of the same host using dns domainIf I change a user's username and password on a server, should I still be able to remotely SSH in as this user without any other changes?New User unable to login via sshWhy does git clone prompt for 'passphrase for key' when I SSH to my machine as my user?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am using Ubuntu 16.04 on an RPi 3 model B which I want to access using SSH
Using the long command:
$ ssh username@hostname
OR
$ ssh username@pi.ip.add.ress
I am able to successfully ssh into my RPi. But after creating the alias in ~/.ssh/config
like:
Host myshortuser
User username
Hostname pi.ip.add.ress
and then try the command:
$ ssh myshortuser
I get the error:
ssh: Could not resolve hostname myshortuser: Temporary failure in name resolution
ssh
bumped to the homepage by Community♦ 41 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 3 more comments
I am using Ubuntu 16.04 on an RPi 3 model B which I want to access using SSH
Using the long command:
$ ssh username@hostname
OR
$ ssh username@pi.ip.add.ress
I am able to successfully ssh into my RPi. But after creating the alias in ~/.ssh/config
like:
Host myshortuser
User username
Hostname pi.ip.add.ress
and then try the command:
$ ssh myshortuser
I get the error:
ssh: Could not resolve hostname myshortuser: Temporary failure in name resolution
ssh
bumped to the homepage by Community♦ 41 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
There is no alias in your example.
– Ipor Sircer
May 25 '18 at 13:13
2
@Christopher: why? That's totally defeats the purpose of theHost
stanza in thessh_config
. The whole point is to assign a name independent of the host name.
– 0xC0000022L
May 25 '18 at 13:17
1
@Christopher: every entry on theHost
line can be a nickname (or alias, as Hassaan put it), as long as there is aHostName
stanza. Additional rules apply. I've used this for example to fake old non-existent domain names in aCVSROOT
when the server got moved.
– 0xC0000022L
May 25 '18 at 13:19
1
@Christopher: Editing your/etc/hosts
requires privileges you may not have as ordinary user. With your advice you are subverting one of the really cool features the OpenSSH client andssh_config(5)
have to offer. It's true that your method will work, but only if theHostName
stanza is removed at the same time from the SSH config file.
– 0xC0000022L
May 25 '18 at 13:33
1
Runssh -vv myshortuser id 2>&1 > sshoutput.log
. Then look insshoutput.log
for any errors. Your system doesn't seem to be reading the~/.ssh/config
file. That may be due to permissions, or due to a system wide restriction on reading user files.
– Tim Kennedy
May 25 '18 at 15:06
|
show 3 more comments
I am using Ubuntu 16.04 on an RPi 3 model B which I want to access using SSH
Using the long command:
$ ssh username@hostname
OR
$ ssh username@pi.ip.add.ress
I am able to successfully ssh into my RPi. But after creating the alias in ~/.ssh/config
like:
Host myshortuser
User username
Hostname pi.ip.add.ress
and then try the command:
$ ssh myshortuser
I get the error:
ssh: Could not resolve hostname myshortuser: Temporary failure in name resolution
ssh
I am using Ubuntu 16.04 on an RPi 3 model B which I want to access using SSH
Using the long command:
$ ssh username@hostname
OR
$ ssh username@pi.ip.add.ress
I am able to successfully ssh into my RPi. But after creating the alias in ~/.ssh/config
like:
Host myshortuser
User username
Hostname pi.ip.add.ress
and then try the command:
$ ssh myshortuser
I get the error:
ssh: Could not resolve hostname myshortuser: Temporary failure in name resolution
ssh
ssh
edited May 25 '18 at 13:26
Prvt_Yadv
3,7613 gold badges17 silver badges34 bronze badges
3,7613 gold badges17 silver badges34 bronze badges
asked May 25 '18 at 13:12
HassaanHassaan
162 bronze badges
162 bronze badges
bumped to the homepage by Community♦ 41 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 41 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 41 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
There is no alias in your example.
– Ipor Sircer
May 25 '18 at 13:13
2
@Christopher: why? That's totally defeats the purpose of theHost
stanza in thessh_config
. The whole point is to assign a name independent of the host name.
– 0xC0000022L
May 25 '18 at 13:17
1
@Christopher: every entry on theHost
line can be a nickname (or alias, as Hassaan put it), as long as there is aHostName
stanza. Additional rules apply. I've used this for example to fake old non-existent domain names in aCVSROOT
when the server got moved.
– 0xC0000022L
May 25 '18 at 13:19
1
@Christopher: Editing your/etc/hosts
requires privileges you may not have as ordinary user. With your advice you are subverting one of the really cool features the OpenSSH client andssh_config(5)
have to offer. It's true that your method will work, but only if theHostName
stanza is removed at the same time from the SSH config file.
– 0xC0000022L
May 25 '18 at 13:33
1
Runssh -vv myshortuser id 2>&1 > sshoutput.log
. Then look insshoutput.log
for any errors. Your system doesn't seem to be reading the~/.ssh/config
file. That may be due to permissions, or due to a system wide restriction on reading user files.
– Tim Kennedy
May 25 '18 at 15:06
|
show 3 more comments
There is no alias in your example.
– Ipor Sircer
May 25 '18 at 13:13
2
@Christopher: why? That's totally defeats the purpose of theHost
stanza in thessh_config
. The whole point is to assign a name independent of the host name.
– 0xC0000022L
May 25 '18 at 13:17
1
@Christopher: every entry on theHost
line can be a nickname (or alias, as Hassaan put it), as long as there is aHostName
stanza. Additional rules apply. I've used this for example to fake old non-existent domain names in aCVSROOT
when the server got moved.
– 0xC0000022L
May 25 '18 at 13:19
1
@Christopher: Editing your/etc/hosts
requires privileges you may not have as ordinary user. With your advice you are subverting one of the really cool features the OpenSSH client andssh_config(5)
have to offer. It's true that your method will work, but only if theHostName
stanza is removed at the same time from the SSH config file.
– 0xC0000022L
May 25 '18 at 13:33
1
Runssh -vv myshortuser id 2>&1 > sshoutput.log
. Then look insshoutput.log
for any errors. Your system doesn't seem to be reading the~/.ssh/config
file. That may be due to permissions, or due to a system wide restriction on reading user files.
– Tim Kennedy
May 25 '18 at 15:06
There is no alias in your example.
– Ipor Sircer
May 25 '18 at 13:13
There is no alias in your example.
– Ipor Sircer
May 25 '18 at 13:13
2
2
@Christopher: why? That's totally defeats the purpose of the
Host
stanza in the ssh_config
. The whole point is to assign a name independent of the host name.– 0xC0000022L
May 25 '18 at 13:17
@Christopher: why? That's totally defeats the purpose of the
Host
stanza in the ssh_config
. The whole point is to assign a name independent of the host name.– 0xC0000022L
May 25 '18 at 13:17
1
1
@Christopher: every entry on the
Host
line can be a nickname (or alias, as Hassaan put it), as long as there is a HostName
stanza. Additional rules apply. I've used this for example to fake old non-existent domain names in a CVSROOT
when the server got moved.– 0xC0000022L
May 25 '18 at 13:19
@Christopher: every entry on the
Host
line can be a nickname (or alias, as Hassaan put it), as long as there is a HostName
stanza. Additional rules apply. I've used this for example to fake old non-existent domain names in a CVSROOT
when the server got moved.– 0xC0000022L
May 25 '18 at 13:19
1
1
@Christopher: Editing your
/etc/hosts
requires privileges you may not have as ordinary user. With your advice you are subverting one of the really cool features the OpenSSH client and ssh_config(5)
have to offer. It's true that your method will work, but only if the HostName
stanza is removed at the same time from the SSH config file.– 0xC0000022L
May 25 '18 at 13:33
@Christopher: Editing your
/etc/hosts
requires privileges you may not have as ordinary user. With your advice you are subverting one of the really cool features the OpenSSH client and ssh_config(5)
have to offer. It's true that your method will work, but only if the HostName
stanza is removed at the same time from the SSH config file.– 0xC0000022L
May 25 '18 at 13:33
1
1
Run
ssh -vv myshortuser id 2>&1 > sshoutput.log
. Then look in sshoutput.log
for any errors. Your system doesn't seem to be reading the ~/.ssh/config
file. That may be due to permissions, or due to a system wide restriction on reading user files.– Tim Kennedy
May 25 '18 at 15:06
Run
ssh -vv myshortuser id 2>&1 > sshoutput.log
. Then look in sshoutput.log
for any errors. Your system doesn't seem to be reading the ~/.ssh/config
file. That may be due to permissions, or due to a system wide restriction on reading user files.– Tim Kennedy
May 25 '18 at 15:06
|
show 3 more comments
1 Answer
1
active
oldest
votes
please make sure the hostname is unique in your network.
sudo nano /etc/hosts --> will show the list of the hostnames.
Please change the hostname at 127.0.1.1
to make the changes effected, please run
sudo /etc/init.d/hostname.sh
sudo reboot
The hostname created is unique; there is no other system in my network with the same hostname.
– Hassaan
May 27 '18 at 22:08
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f445998%2fssh-unable-to-resolve-hostname-when-using-alias%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
please make sure the hostname is unique in your network.
sudo nano /etc/hosts --> will show the list of the hostnames.
Please change the hostname at 127.0.1.1
to make the changes effected, please run
sudo /etc/init.d/hostname.sh
sudo reboot
The hostname created is unique; there is no other system in my network with the same hostname.
– Hassaan
May 27 '18 at 22:08
add a comment |
please make sure the hostname is unique in your network.
sudo nano /etc/hosts --> will show the list of the hostnames.
Please change the hostname at 127.0.1.1
to make the changes effected, please run
sudo /etc/init.d/hostname.sh
sudo reboot
The hostname created is unique; there is no other system in my network with the same hostname.
– Hassaan
May 27 '18 at 22:08
add a comment |
please make sure the hostname is unique in your network.
sudo nano /etc/hosts --> will show the list of the hostnames.
Please change the hostname at 127.0.1.1
to make the changes effected, please run
sudo /etc/init.d/hostname.sh
sudo reboot
please make sure the hostname is unique in your network.
sudo nano /etc/hosts --> will show the list of the hostnames.
Please change the hostname at 127.0.1.1
to make the changes effected, please run
sudo /etc/init.d/hostname.sh
sudo reboot
answered May 25 '18 at 13:36
sivasiva
12 bronze badges
12 bronze badges
The hostname created is unique; there is no other system in my network with the same hostname.
– Hassaan
May 27 '18 at 22:08
add a comment |
The hostname created is unique; there is no other system in my network with the same hostname.
– Hassaan
May 27 '18 at 22:08
The hostname created is unique; there is no other system in my network with the same hostname.
– Hassaan
May 27 '18 at 22:08
The hostname created is unique; there is no other system in my network with the same hostname.
– Hassaan
May 27 '18 at 22:08
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f445998%2fssh-unable-to-resolve-hostname-when-using-alias%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
There is no alias in your example.
– Ipor Sircer
May 25 '18 at 13:13
2
@Christopher: why? That's totally defeats the purpose of the
Host
stanza in thessh_config
. The whole point is to assign a name independent of the host name.– 0xC0000022L
May 25 '18 at 13:17
1
@Christopher: every entry on the
Host
line can be a nickname (or alias, as Hassaan put it), as long as there is aHostName
stanza. Additional rules apply. I've used this for example to fake old non-existent domain names in aCVSROOT
when the server got moved.– 0xC0000022L
May 25 '18 at 13:19
1
@Christopher: Editing your
/etc/hosts
requires privileges you may not have as ordinary user. With your advice you are subverting one of the really cool features the OpenSSH client andssh_config(5)
have to offer. It's true that your method will work, but only if theHostName
stanza is removed at the same time from the SSH config file.– 0xC0000022L
May 25 '18 at 13:33
1
Run
ssh -vv myshortuser id 2>&1 > sshoutput.log
. Then look insshoutput.log
for any errors. Your system doesn't seem to be reading the~/.ssh/config
file. That may be due to permissions, or due to a system wide restriction on reading user files.– Tim Kennedy
May 25 '18 at 15:06