ssh 不输入密码连接服务器

Posted by wxianfeng Thu, 14 Apr 2011 17:39:00 GMT

环境:ubuntu10.10(client) + Centos 5.5 (server)

每次ssh连接服务器 ,scp 拷贝东西 , 或者rsync同步 ,都要输入密码验证,很麻烦,把publickey传到server上的 authorized_keys 中即可 ,建立信任后就不需要输入密码了

1,生成publickey

>ssh-keygen -t rsa # 或者用 dsa 加密

2,上传 publickey 文件到server

>scp  ~/.ssh/id_dsa.pub root@173.230.155.150:~/.ssh/authorized_keys # 173.230.155.150  换成你server的ip

3,ok了

======

本地普通用户免密码连接服务器上的普通用户
把服务器上的 authorized_keys 变为 600权限,.ssh 目录和用户主目录变为 700 / 755 权限

[entsea@www .ssh]$ ll
total 16
-rw-------. 1 entsea entsea  404 May 19 02:50 authorized_keys

=========

ssh时候直接写host连接,不写username配置

localhost:.ssh wangxianfeng$ cat ~/.ssh/config 
Host www.wxianfeng.com
    user wxianfeng

>ssh www.wxianfeng.com

http://liluo.org/2011/05/%E8%AE%BE%E7%BD%AE-ssh-%E8%87%AA%E5%8A%A8%E7%99%BB%E9%99%86%EF%BC%88%E5%85%8D%E5%AF%86%E7%A0%81%EF%BC%8C%E7%94%A8%E6%88%B7%E5%90%8D%EF%BC%89/
http://topic.csdn.net/u/20110701/12/2519a5cc-77d3-4fda-b2d0-88c62edd2556.html

This entry was posted on Thu, 14 Apr 2011 17:39:00 GMT and Posted in . You can follow any any response to this entry through the Atom feed. You can leave a comment or a trackback from your own site.

Tags


Trackbacks

Use the following link to trackback from your own site:
http://wxianfeng.com/trackbacks?article_id=198

  1. Cheat league Of angels Cheat league Of angels
    ssh 不输入密码连接服务器 | 0x64

Comments

  1. Avatar
    Mikellag almost {{count}} years ago:

    where i can to order tickets, tour tickets now on sale Ariana Grande tickets purchase online tour tickets agency, how much do tickets cost Cheapest Red Hot Chili Peppers tickets tickets sites, concert tour tickets images Purchase Def Leppard tickets online tour tickets without service, tour tickets without service Where to purchase Lady Gaga tickets tickets email, tickets for today http://19qs.555ticketsnow.com/concert/cheap-ariana-grande-tickets-48773.html theater e-ticket by e-mail, concert tickets for * Where i can to purchase Metallica tickets
    theater tickets economics, tickets for wicked How to get John Mayer tickets online tickets home tickets, theater tickets purchase online Zac Brown Band tickets economics tickets sale, concert tour tickets purchased Lady Gaga ticket price where to purchase tickets, tickets direct http://p5i.555ticketsnow.com/concert/bon-jovi-tickets-direct-18495.html concert tickets to your door, concert tour tickets pour
    tickets home tickets, how can i get tickets to * Tim McGraw & Faith Hill tickets agency theater tickets economy, tickets cost U2 tickets tax concert tour tickets images, tickets booking Jeff Dunham tickets at discount theater tickets with paypal, selling tickets How much tickets Jeff Dunham cost concert tour tickets music, tickets for teachers http://2oc.555ticketsnow.com/concert/how-much-is-tickets-iron-maiden-43925.html tickets with paypal, tickets show Rod Stewart tickets samples
    tickets home tickets, booking tickets online John Mayer tickets cheapest tickets cost, vip tickets Where i can to purchase Metallica tickets concert tickets example, concert tickets bill How to buy Def Leppard tickets online tickets price, concert tickets to * http://2yc4.555ticketsnow.com/concert/how-to-buy-lady-gaga-tickets-online-95312.html concert tickets to *, tickets events

  2. Avatar
    Mikellag almost {{count}} years ago:

    concert tour tickets home tickets, concert tickets email Where i can to buy Green Day tickets tour tickets now review, concert tickets sale How much is tickets Queen & Adam Lambert show tickets, concert tickets gift Purchase Blondie & Garbage tickets online concert tour tickets home printing, tickets cheapest Jeff Dunham ticket tickets in my area, tickets buy online http://l9.555ticketsnow.com/concert/book-roger-waters-tickets-online-13384.html tour tickets, how to order tickets online Where i can to order Billy Joel tickets
    concert tickets *, concert tour tickets ebay Lady Gaga tickets economic tickets buy online, concert tickets price Luke Bryan ticket price theater tickets for wicked, concert tour tickets agents Rod Stewart tickets discount concert tour tickets pour, tour tickets book http://a5a.555ticketsnow.com/concert/roger-waters-tickets-at-discount-75661.html tickets *, tour tickets economics
    concert tickets for *, where to purchase theatre tickets How to order Red Hot Chili Peppers tickets online how many concert tickets have sold, tour tickets Def Leppard tickets facebook tickets theater, concert tickets sites Sam Hunt tickets samples theater tickets facebook, concert tickets cheapest Queen & Adam Lambert tickets direct price of theater tickets *, theatre tickets cheap http://8re4.555ticketsnow.com/concert/luke-bryan-tickets-cost-24647.html concert tickets exchange, where to buy tickets Booking Green Day tickets online
    theater tickets sellers, theater ticket prices Red Hot Chili Peppers tickets using paypal credit where to purchase tickets, concert tour tickets get your tickets John Mayer tickets home tickets tour tickets cheap, tour tickets with no service Lady Gaga tickets prices theater tickets online, price of theater tickets * http://jr77.555ticketsnow.com/concert/purchase-queen-adam-lambert-tickets-online-79345.html tickets discounted, theater tickets facebook

  3. Avatar
    alisonpl18 almost {{count}} years ago:

    Бесплатная эротика и секс фото галереи
    http://popki.sexgalleries.top/?blog.kenia
    Ряд порно фото ради взрослых

Leave a comment