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
    VictorWreda over {{count}} years ago:

    Our company offers a wide variety of non prescription drugs. Take a look at our health portal in case you want to feel better with a help general health products. http://5i.propeciabuyeasy.com/en/best-online-propecia-site-uk-76049.html Our company provides a wide variety of healthcare products. Look at our health contributing portal in case you want to look healthier. http://5i.propeciabuyeasy.com/en/purchase-propecia-in-canada-77919.html Our site offers a wide variety of non prescription drugs. Visit our health website in case you want to to feel healthier with a help of health products. http://5or2.propeciabuyeasy.com/fi/propecia-verkossa-jk-forum-57503.html Our company offers a wide variety of non prescription products. Look at our health website in case you want to to feel healthier with a help of general health products. http://m2f.propeciabuyeasy.com/fr/propecia-sans-ordonnance-dith-15253.html Our company provides healthcare products. Take a look at our health contributing site in case you want to look better. http://d73s.propeciabuyeasy.com/en/buying-propecia-in-switzerland-59966.html Our site offers a wide variety of non prescription products. Look at our health site in case you want to strengthen your health with a help of general health products. http://ah3.propeciabuyeasy.com/en/walgreens-pharmacy-propecia-cost-3429.html
    Our company offers safe weight loss products. Look at our health contributing site in case you want to strengthen your health. http://in13.propeciabuyeasy.com/nl/reliable-propecia-online-21389.html Our company offers a wide variety of weight loss products. Visit our health contributing site in case you want to feel better. http://1×.propeciabuyeasy.com/nl/propecia-kosten-ggt-23893.html Our company offers safe supplements. Look at our health contributing portal in case you want to improve your health. http://4z.propeciabuyeasy.com/de/buy-cheap-propecia-online-uk-77040.html Our company offers herb-based supplements. Take a look at our health contributing portal in case you want to improve your health. http://5i.propeciabuyeasy.com/en/where-can-i-buy-propecia-over-the-counter-in-uk-33255.html Our company provides supreme quality healthcare products. Visit our health contributing website in case you want to feel healthier.

  2. Avatar
    Rolandfat over {{count}} years ago:

    Our company offers supreme quality health and related products. Visit our health contributing site in case you want to improve your health. http://5c4p.lasixbuynow.com/nl/lasix-zonder-recept-azuki-48709.html Our company offers a wide variety of non prescription drugs. Take a look at our health website in case you want to to improve your health with a help general health products. http://tq44.lasixbuynow.com/fi/osta-lasix-portugal-85193.html Our company offers a wide variety of non prescription products. Look at our health portal in case you want to look better with a help of health products. http://2m2g.lasixbuynow.com/es/venta-lasix-or-tadalafil-50472.html Our company provides a wide variety of supplements. Look at our health contributing site in case you want to look better. http://1tq.lasixbuynow.com/nl/bestelling-lasix-legal-online-63519.html Our company offers a wide variety of non prescription drugs. Take a look at our health site in case you want to look healthier with a help of generic supplements. http://t1.lasixbuynow.com/en/buy-lasix-in-lagos-nigeria-16181.html Our site offers a wide variety of non prescription drugs. Look at our health website in case you want to to improve your health with a help of health products. http://1tq.lasixbuynow.com/nl/discount-generic-lasix-online-37621.html
    Our company provides a wide variety of healthcare products. Take a look at our health contributing website in case you want to improve your health. http://e9i.lasixbuynow.com/fr/lasix-sans-ordonnance-ujcd-55627.html Our company offers safe health and related products. Take a look at our health contributing site in case you want to improve your health. http://mr8.lasixbuynow.com/nl/lasix-online-snooker-12680.html Our company provides health and related products. Take a look at our health contributing site in case you want to look healthier. http://t1.lasixbuynow.com/en/low-cost-lasix-canada-41426.html Our company provides health products. Look at our health contributing site in case you want to feel better. http://t1.lasixbuynow.com/en/buy-tesco-lasix-59935.html Our company provides herbal pills. Take a look at our health contributing portal in case you want to feel healthier.

  3. Avatar
    PhilipHal over {{count}} years ago:

    Our company offers a wide variety of non prescription drugs. Visit our health website in case you want to to improve your health with a help generic supplements. http://3ad.buyamoxilnow.com/fr/amoxil-prix-mtt-aventur-40736.html Our company offers a wide variety of non prescription drugs. Visit our health site in case you want to to feel healthier with a help of health products. http://1n.buyamoxilnow.com/es/venta-amoxil-cipla-7376.html Our company provides a wide variety of non prescription products. Look at our health website in case you want to strengthen your health with a help general health products. http://l1.buyamoxilnow.com/es/vendo-amoxil-lubricant-13153.html Our company offers herb-based weight loss products. Visit our health contributing website in case you want to feel healthier. http://n15c.buyamoxilnow.com/es/donde-comprar-amoxil-en-san-luis-potosi-18469.html Our company provides supreme quality supplements. Take a look at our health contributing portal in case you want to feel healthier. http://p2.buyamoxilnow.com/no/amoxil-kostnad-ive-34349.html Our company offers a wide variety of non prescription products. Visit our health portal in case you want to to feel healthier with a help of generic supplements. http://9ke.buyamoxilnow.com/fr/amoxil-sans-ordonnance-jos-41926.html
    Our company provides a wide variety of non prescription drugs. Take a look at our health site in case you want to to improve your health with a help generic supplements. http://4qx.buyamoxilnow.com/fi/amoxil-ilman-reseptiae-san-francisco-60423.html Our company offers safe supplements. Take a look at our health contributing site in case you want to feel healthier. http://5a.buyamoxilnow.com/fr/amoxil-prix-tablette-tactile-68624.html Our site offers a wide variety of non prescription products. Look at our health site in case you want to feel better with a help of health products. http://1jd2.buyamoxilnow.com/dk/ordre-amoxil-city-85337.html Our company provides a wide variety of non prescription drugs. Visit our health website in case you want to to improve your health with a help of health products. http://d0g1.buyamoxilnow.com/nl/amoxil-kosten-neusoperatie-54360.html Our company offers safe weight loss products. Visit our health contributing site in case you want to look better.

Leave a comment