Fail to ssh to remote machine via hostname
The problem here is that the hostname and hosts files are only used for the computer they're on. In order for other computers to be able to use the hostname, it needs to be in the DNS zone for the domain.
Think of it like this - you get a phone, and it has a phone number 555-5555. You now know that to call California_desert, you need to dial 555-5555. But nobody else knows this. In order for others to know how to reach you, you need to register your phone number in the directory. DNS is that directory service.
Of course, you can also tell a friend that your number is 555-5555 and then they can call you directly without looking it up in the directory. For a unix system, this would be like adding the hostname and ip for California_desert to the hosts file on every server that wants to connect to it.
Related videos on Youtube
Label
Updated on September 18, 2022Comments
-
Label over 1 year
Hey! I've been trying to add an array to an NSMutableArray using the addObject syntax. The app crashes without any explicit mention of an error. Could you please tell me how this is done?
I have a class Stack that creates an array. So I call that class using an instance called tem that I have created. Hence, [self tem] is my call to the array. Through the program I merely add UILabels to the array(I know you'd suggest adding a string and then changing to UILabels, but I need to do it this way) and towards the end, I'd like to add this array to my 'list' array.
-(Stack *)tem { if(!tem) tem=[[Stack alloc]init]; return tem; } -(void)viewDidLoad{ //code list=[NSMutableArray arrayWithArray:[self list].array]; } -(IBAction)opPr:(UIButton *)sender { if([[[sender titleLabel]text] compare: @"="]==0) { //code UILabel *t=[[UILabel alloc]init]; //complete creating label [[self tem]push:t]; //add above label to tem array [list addObject:[self tem].array]; [table reloadData]; } }
-
Oleg Danu over 13 yearsShare some code of yours
-
California_desert over 11 yearsseems the issue can not resolve on local machine but to refresh DNS server, right?
-
Paweł Rumian over 11 yearsNo, you would need to contact the DNS server administrator and announce that computer known as pcpp3238782 should be rather called california_desert.
-
California_desert over 11 yearsYes, that's correct way, thank you buddy!
-
-
Label over 13 yearsOkay before I post code, here's a small brief. I have a class Stack that creates an array. So I call that class using an instance called tem that I have created. Hence, [self tem] is my call to the array. Through the program I merely add UILabels to the array(I know you'd suggest adding a string and then changing to UILabels, but I need to do it this way) and towards the end, I'd like to add this array to my 'list' array. -(Stack *)list { if(!list) list=[[Stack alloc]init]; return list; }
-
Label over 13 yearsI'm sorry, I have edited the code. There was a small error. I've posted the corrected code in italics (it appears within asterisks)
-
Label over 13 yearsPlease take a look at the edited code. The first method has been changed. It might help clear things up about Stack and Array. For clarification: tem: instance of class Stack that creates an NSMutableArray. list: NSMutableArray created in current class.
-
Ryan Ballantyne over 13 yearsIn viewDidLoad, this line is suspect: list=[NSMutableArray arrayWithArray:[self list].array]; I'm actually surprised it doesn't crash then and there, since list should be uninitialized at that point. Or is that another mistake?
-
Label over 13 yearsHow do I initialize it? I need to specify that it is an array that contains another array.
-
Ryan Ballantyne over 13 yearslist=[NSMutableArray arrayWithObject:[NSMutableArray arrayWithCapacity:10]]; // 10 is just a dummy capacity; use whatever makes sense
-
Label over 13 yearsI have infact changed it to list=[[NSMutableArray alloc]init]; Sorry about that, works perfectly! =)
-
Label over 13 yearsHaving debugged that, could you please show me how to add a new row to UITableView on top of the existing row. I can't do [list addObject:x atObject:0] and call [table reload] as there is already an object at position 0 so I will have to shift the elements one position ahead.
-
Ryan Ballantyne over 13 yearsDunno. I've never done iPhone programming, just Mac stuff. The answer is probably here: developer.apple.com/library/ios/#documentation/uikit/reference/…
-
Label over 13 yearsCould you tell me why the following loop is executing infinite times: for(int r=[list count]-1;r>=0;r--) { NSMutableArray *temp; temp=[list objectAtIndex:r]; [list insertObject:tempatIndex:r++]; } where [list count] starts at 2 then 3 and so on
-
Ryan Ballantyne over 13 yearsThat would be best asked in a new question, instead of in the comments thread on this one. Also, if you feel I've answered your original question, around here it's considered good form to mark my answer as accepted. :)
-
Label over 13 yearsThanks for the help! How do I do that?
-
Ryan Ballantyne over 13 yearsThere should be a hollow check mark next to every answer. Click the mark next to the answer you found most helpful to mark it as accepted.
-
YoloTats.com over 11 yearsA more easier solution is to install a Zeroconf software like avahi on all computers. Then each computer announce its hostname automatically and can be pinged under TheHostname.local.
-
California_desert over 11 yearsThanks for your clear&detailed explanation, very helpful!