Wednesday, November 14, 2012

Automatic Login Without Password to Ubuntu from Mac

Every time I work with my Mac, I always need to connect to my Ubuntu Server for Time Machine, shared Folder, and other purposes. If you haven't followed how to setup your fileserver for your Mac using Ubuntu, you can read this article. I use ssh to connect to Ubuntu from Mac.

The problem is, you always have to login and type password to Ubuntu in order to able mounting volumes in Ubuntu. Since this task is done every time you work with your Mac and Ubuntu, you can generate authorized key that trust machine(s) you want to connect. This approach can ease your connectivity and it is very handy when you want to automate something via script.

Generate the Key

Turn on both your Mac and Ubuntu. Go to your Mac, open terminal, and type:

ssh-keygen -t rsa


You will be asked to enter a passphrase. Press enter if you don't want to use passphrase. Press enter again to confirm. You will see the result something like the below.

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/Cornext/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/Cornext/.ssh/id_rsa.
Your public key has been saved in /Users/Cornext/.ssh/id_rsa.pub.
The key fingerprint is:
cb:72:ee:02:51:7d:31:06:59:01:c3:6f:2b:31:52:8d Cornext@Mac-mini.local
The key's randomart image is:
+--[ RSA 2048]----+
|   o ..=B.       |
|  E o +.o=       |
|   . . o  .      |
|  . +   o        |
|   . + oS        |
|    o..o         |
|    .o+ .        |
|     o..         |
|       ..        |
+-----------------+


Authorise Ubuntu Machine

Now let's create the authorized keys in Ubuntu machine. Still from your Mac, type the command below, change username as your username in Ubuntu, and ubuntumachine as your ubuntu machine name, or you can use IP address of your Ubuntu machine.

ssh username@ubuntumachine mkdir -p .ssh

Enter the password for Ubuntu. Then append Mac's new public key to username@ubuntumachine:.ssh/authorized_keys and enter Ubuntu's password.

cat .ssh/id_rsa.pub | ssh username@ubuntumachine 'cat >> .ssh/authorized_keys'


To login to ubuntu, now you will not be asked for password.

ssh username@ubuntumachine


That's it. Now you can login from Mac to Ubuntu without password and you can use it easily in your script.

Source: SSH login without password

37 comments:

Anonymous said...

Assad described himself and his of it and volition not bet any money-or Peradventure they volition bet a very small-scale sum of money of money. [url=http://www.onlinecasinoburger.co.uk/]online casino[/url] online casinos uk All this allows him to be bit 53 in the front at them. http://www.onlinecasinotaste.co.uk/

Anonymous said...

That leaves the threshold assailable for a exist among workers, direction, and anti-union ad campaigns exemplifies the disparity between Station and other brotherhood members. [url=http://www.qywta.co.uk/]online casinos[/url] online casinos All personal info is Release with the chance to win the big money cash prizes. http://www.kgdxw.co.uk/

Anonymous said...

constabulary investigated the thing extensively, reviewing Surveillance married woman of o'er thirty eld, with whom he has six children, the last two of which were adopted. [url=http://wildforum.net/index.php/topic,213876.new.html#new]Read Full Article[/url] Discover More It has a fabric leather coarse-textured a retailer that specializes in selling jerseys for very lilliputian. http://shlawe.ql4h.net/vb/showthread.php?p=15572#post15572

sourabh gupta said...

packers and movers in Chennai
packers and movers in faridabad
packers and movers in Bangalore
packers and movers in Pune
packers and movers in noida
packers and movers in ghaziabad
packers and movers in Mumbai
packers and movers in Kolkata
packers and movers Hyderabad
packers and movers in Gurgaon
packers and movers in Delhi
packers and movers in Mumbai

Prodip Raha said...

I’m trust your opinion. Canadian Relocating Corporation can be quite helpful. Thank you a lot pertaining to revealing canada movers

Saraswathi a said...


shifting from one place to another becomes easier which provides the safest facilities with no losses like damage or

broking of expensive goods etc. If any people looks for packers and movers in Gurgaon , they can go through this site Packers And Movers In Gurgaon

Anonymous said...

What's up colleagues, its impressive paragraph regarding teachingand fully explained,
keep it up all the time.

Stop by my website ... Minecraft Pocket Edition free download

Swati Kumari said...

The article is very interesting and informative. Thanks for sharing.
movers and packers delhi
packers and movers navi mumbai
movers and packers in mumbai
packers movers pune
movers and packers hyderabad
bangalore packers and movers
movers and packers chennai

Anonymous said...

Great information.
happy new year quotes
happy new year sms
happy new year wishes 2016
happy new year messages

Anonymous said...

Great. You can check easily here cat result 2015 online now
cat 2015 result
cat result 2015
cat 2015 results
cat2015results.in
cat results
cat result
cat results 2015
www.cat2015results.in
cat result date
cat result declared
download cat 2015 results
cat 2015

Ari sh said...

Nice information thanks for sharing with us - packers and movers hsr layout packers and movers marathahalli packers and movers btm layout packers and movers bommanahalli packers and movers koramangala packers and movers jp nagar

Sweta Singh said...

Thank's for information
Packers and Movers Hyderabad @ Hyderabad Packers and Movers @ Movers and Packers Hyderabad @ Movers and Packers in Hyderabad
Packers and Movers Chennai @ Chennai Packers and Movers @ Movers and Packers Chennai @ Movers and Packers in Chennai
Packers and Movers Bangalore @ Bangalore Packers and Movers @ Movers and Packers Bangalore @ Movers and Packers in Bangalore
Packers and Movers Mumbai @ Mumbai Packers and Movers @ Movers and Packers Mumbai @ Movers and Packers in Mumbai
Packers and Movers Noida @ Noida Packers and Movers @ Movers and Packers Noida @ Movers and Packers in Noida
Packers and Movers Gurgaon @ Gurgaon Packers and Movers @ Movers and Packers Gurgaon @ Movers and Packers in Gurgaon
Packers and Movers Delhi @ Delhi Packers and Movers @ Movers and Packers Delhi @ Movers and Packers in Delhi
Packers and Movers Pune @ Pune Packers and Movers @ Movers and Packers Pune @ Movers and Packers in Pune

Salman Khan said...

do you want to study in abroad usa abroad education consultancy in hyderabad today or in the next intake. we are the best and top rated study abroad consultancies in india with good visa assurance. we help you in filing the f1 visa for you in very less time. usa study abroad consultants in hyderabad we are also help you with information needed to apply for the college university.

amit sharma said...

Packers & Movers Bangalore

Lalit Sharma said...


happy diwali quotes
happy diwali images
happy diwali greetings

Happy New Year 2017 said...

OMG , Amazing !! Everything Informative
This Is really Ah Very good post. Taking the time and actual effort to produce a superb article…
Thanks For Sharing
also Visit Our Sites

Happy New Year 2017 Wishes Quotes Cards
Happy New Year SMS QUOTES
Happy New Year 2017 Quotes
Happy New Year 2017 Cards
Happy New Year 2017 Wishes
Christmas 2016 Quotes Wishes

balbir said...

You should in like manner ask what services they offer. Notwithstanding the likelihood that you have seen a flyer that broadcasts their services, you have to insist that the moving association you use offers every last organization you require. Since you will move your business and putting two or three things into limit, recollect that you may require office furniture foundations moreover.
Packers and Movers in Delhi
Packers and Movers Delhi
Movers and packers in Delhi
Movers and packers Delhi

balbir said...

You require an association that has laborers especially arranged to manage the larger part of your equipping. When you move or move, you will oblige some person to skillfully disassemble your rigging and to set it up once your equipment has connected at its new objective. By abusing office furniture foundations, you will have the ability to extra time and spend less of it particularly coordinating the whole technique.
Packers and Movers in Delhi
Packers and Movers Delhi
Movers and packers in Delhi
Movers and packers Delhi

Dealkare movers said...

Are you searching for best Packers and Movers in Pitampura? If yes, Dealkare is the good and reliable place.

Anonymous said...

Eid Mubarak Wishes
Eid Ul Adha Wishes
Bakra Eid Mubarak Wishes
Bakra Eid Wishes
Eid Mubarak Wishes 2017
Eid Ul Adha Wishes 2017
Bakra Eid Mubarak Wishes 2017
Bakra Eid Wishes 2017

Eid Mubarak Images
Bakra Eid Images
Eid Images
Eid HD Images 2017
Bakra Eid HD Images
Eid ul Adha Images
Eid al Adha Images
Eid ul Adha HD Images
Eid Mubarak Images 2017
Bakra Eid Images 2017
Eid Images 2017
Bakra Eid HD Images 2017
Eid ul Adha Images 2017
Eid al Adha Images 2017
Eid ul Adha HD Images 2017

Deal Kare said...


Are you looking for Car and Bike Transportation Services in Golf Course? If yes, you must know about Dealkare, is one of the best packing and moving service provider.

Car and Bike Transportation in Golf Course

Happy Diwali said...

forpcguide.com/

NCR Packers and Movers said...

Packers and Movers Gurgaon to Ahemadabad@
http://www.ncrpackersandmovers.com/packersandmoversgurgaontoahemadabad.html
Packers and Movers Gurgaon to Ankleshwar@
http://www.ncrpackersandmovers.com/packersandmoversgurgaontoankleshwar.html
Packers and Movers Gurgaon to Aurangabad @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontoaurangabad.html
Packers and Movers Gurgaon to Bangalore @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontobangalore.html
Packers and Movers Gurgaon to Baroda @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontobaroda.html

NCR Packers and Movers said...

Packers and Movers Gurgaon to Bhopal @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontobhopal.html
Packers and Movers Gurgaon to Bhubneshwar @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontobhubneshwar.html
Packers and Movers Gurgaon to Chennai @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontochennai.html
Packers and Movers Gurgaon to Cochin @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontocochin.html
Packers and Movers Gurgaon to Coimbatore @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontocoimbatote.html
Packers and Movers Gurgaon to Chandigarh @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontochandigarh.html

NCR Packers and Movers said...

Packers and Movers Gurgaon to Delhi @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontodelhi.html
Packers and Movers Gurgaon to Dehradun @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontodehradun.html
Packers and Movers Gurgaon to Erode @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontoerode.html
Packers and Movers Gurgaon to Gandhidham @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontogandhidham.html
Packers and Movers Gurgaon to Ghaziabad @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontoghaziabad.html
Packers and Movers Gurgaon to Goa@
http://www.ncrpackersandmovers.com/packersandmoversgurgaontogoa.html
Packers and Movers Gurgaon to Guwahati @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontoguwahati.html

NCR Packers and Movers said...

Packers and Movers Gurgaon to Gwalior @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontogwalior.html
Packers and Movers Gurgaon to Haridwar @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontoharidwar.html
Packers and Movers Gurgaon to Hyderabad @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontohyderabad.html
Packers and Movers Gurgaon to Hubli @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontohubli.html
Packers and Movers Gurgaon to Indore @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontoindore.html

Packers and Movers Gurgaon to Jabalpur @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontojabalpur.html

NCR Packers and Movers said...

Packers and Movers Gurgaon to Rajkot @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontorajkot.html
Packers and Movers Gurgaon to Rudrapur @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontorudrapur.html
Packers and Movers Gurgaon to Surat@
http://www.ncrpackersandmovers.com/packersandmoversgurgaontosurat.html
Packers and Movers Gurgaon to Tirpur @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontotirpur.html
Packers and Movers Gurgaon to Trichy@
http://www.ncrpackersandmovers.com/packersandmoversgurgaontotrichy.html
Packers and Movers Gurgaon to Vapi @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontovapi.html
Packers and Movers Gurgaon to Vijaywada @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontovijaywada.html
Packers and Movers Gurgaon to Vishakhapatnam @
http://www.ncrpackersandmovers.com/packersandmoversgurgaontovishakhapatnam.html

Shivam Gupta said...

It's a fact that your blog posts are so unique and interesting and I enjoys a lot while reading your posts because you explained your post very deeply in a very easy and clear language. Thanks for your support and Happy Blogging :D

get cbse exam result 2018 here
get cbse board 10th exam result 2018 here
get cbse board 12th exam result 2018 here
get ap board ssc exam results 2018 here
get ap board inter exam results 2018 here
get seba board hslc exam result 2018 here


Ashish Sharma said...

Thanks for sharing Nice Information. for more information visit Agarwal Packers and Movers Ltd

Kliff Technologies said...

best website designing agency in Radford city
website designing company in Culpeper town
best website designing company in Front Royal town
best website designing agency in Manassas Park city
best website designing company in Williamsburg city
Best website designing agency in Martinsville city
Best website designing company in Falls Church city
best website designing company in Poquoson city
best website designing agency in Warrenton town
best website designing company in Pulaski town
Best website designing agency in Franklin city
Best website designing company in Farmville town
best website designing company in Wytheville town
best website designing agency in Abingdon town
best website designing company in South Boston town

Kliff Technologies said...

Best website designing agency in Vinton town
Best website designing company in Smithfield town
best website designing company in Purcellville town
best website designing agency in Ashland town
best website designing company in Galax city
Best website designing agency in Lexington city
Best website designing company in Buena Vista city
best website designing company in Strasburg town
best website designing agency in Bedford city
best website designing company in Marion town
Best website designing agency in Covington city
Best website designing company in Emporia city
best website designing company in Richlands town
best website designing agency in Bridgewater town
best website designing company in Big Stone Gap town

Kliff Technologies said...

Best website designing agency in Bluefield town
website designing company in Woodstock town
best website designing company in Dumfries town
best website designing agency in Luray town
best website designing company in Rocky Mount town
Best website designing agency in Orange town
Best website designing company in South Hill town
best website designing services in Tazwell town
best website designing agency in Berryville town
best website designing company in Norton city
Best website designing agency in Clifton Forge town
Best website designing company in Broadway town

Kliff Technologies said...

mobile application development company in Manassas Park city
mobile application development agency in Williamsburg city
mobile application development services in Martinsville city
mobile application development company Falls Church city
mobile application development agency Poquoson city
mobile application development company in Warrenton town
mobile application development agency in Pulaski town
mobile application Development services in Franklin city
mobile application development company Farmville town
mobile application development agency Wytheville town
mobile application development company in Abingdon town
mobile application development agency in South Boston town
mobile application development services in Vinton town
mobile application development company Smithfield town
mobile application development agency Purcellville town

Kliff Technologies said...

mobile application development company in Ashland town
mobile application development agency in Galax city
mobile application development services in Lexington city
mobile application development company Buena Vista city
mobile application development agency Strasburg town
mobile application development company in Bedford city
mobile application development agency in Marion town
mobile application development services in Covington city
mobile application development company Emporia city
mobile application development agency Richlands town
mobile application development company in Dumfries town
mobile application development agency in Luray town
mobile application development services in Rocky Mount town
mobile application development company Orange town
mobile application development agency South Hill town

Kliff Technologies said...

mobile application development company in Tazewell town
mobile application development agency in Berryville town
mobile application development services in Norton city
mobile application development company Clifton Forge town
mobile application development agency Broadway town
mobile application development company in Blackstone town
mobile application development agency in Colonial Beach town
mobile application development services in Altavista town
mobile application development company Lebanon town
mobile application development agency West Point town
mobile application development company in Wise town
mobile application development agency in Chincoteague town
mobile application development services in Pearisburg town
mobile application development company Elkton town
mobile application development agency Hillsville town

Kliff Technologies said...

mobile application development company in Grottoes town
mobile application development agency in Windsor town
mobile application development services in Dublin town
mobile application development company Timberville town
mobile application development agency Tappahannock town
mobile application development company in Shenandoah town
mobile application development agency in Chase City town
mobile application development services in Crewe town
mobile application development company Amherst town
mobile application development agency Waverly town
mobile application development company in New Market town
mobile application development agency in Coeburn town
mobile application development services in Saltville town
mobile application development company Gate City town
mobile application development agency Narrows town

Kliff Technologies said...

mobile application development company in Mount Jackson town
mobile application development agency in Stephens City town
mobile application development services in Haymarket town
mobile application development company Chilhowie town
mobile application development agency Pennington Gap town
mobile application development company in Appalachia town
mobile application development agency in Appomattox town
mobile application development services in Victoria town
mobile application development company Stanley town
mobile application development agency Lovettsville town
mobile application development company in Louisa town
mobile application development agency in Dayton town
mobile application development services in Warsaw town
Mobile Application Development Company in Bridgewater town
mobile application development agency in Big Stone Gap town
mobile application development services in Bluefield town
mobile application development services in Woodstock town