Jerry-Yang's Log

Just another WordPress.com site

主選單

Skip to primary content
Skip to secondary content
  • 主頁
  • 關於

Tag Archives: login

3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id

Posted on 2013 年 03 月 26 日 by sc.yang
回應

From: http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/

You can login to a remote Linux server without entering password in 3 simple steps using ssky-keygen and ssh-copy-id as explained in this article.

ssh-keygen creates the public and private keys. ssh-copy-id copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also assigns proper permission to the remote-host’s home, ~/.ssh, and ~/.ssh/authorized_keys.

This article also explains 3 minor annoyances of using ssh-copy-id and how to use ssh-copy-id along with ssh-agent.

Step 1: Create public and private keys using ssh-key-gen on local-host

jsmith@local-host$ <strong>ssh-keygen</strong>
Generating public/private rsa key pair.
Enter file in which to save the key (/home/jsmith/.ssh/id_rsa):[Enter key]
Enter passphrase (empty for no passphrase): [Press enter key]
Enter same passphrase again: [Pess enter key]
Your identification has been saved in /home/jsmith/.ssh/id_rsa.
Your public key has been saved in /home/jsmith/.ssh/id_rsa.pub.
The key fingerprint is:
33:b3:fe:af:95:95:18:11:31:d5:de:96:2f:f2:35:f9 jsmith@local-host

Step 2: Copy the public key to remote-host using ssh-copy-id

jsmith@local-host$ <strong>ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host</strong>
jsmith@remote-host's password:
Now try logging into the machine, with "ssh 'remote-host'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.

Note: ssh-copy-id appends the keys to the remote-host’s .ssh/authorized_key.

Step 3: Login to remote-host without entering the password

jsmith@local-host$ <strong>ssh remote-host</strong>
Last login: Sun Nov 16 17:22:33 2008 from 192.168.1.2
[Note: SSH did not ask for password.]
jsmith@remote-host$ [Note: You are on remote-host here]
廣告
張貼在 linux、tools | 標記 linux、login、password、ssh、without | Leave a reply

Create the username, password for logging into the Nagios interface

Posted on 2013 年 02 月 08 日 by sc.yang
回應

 

Create the username, password for logging into the Nagios interface.

# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

# ls -l /usr/local/nagios/etc/htpasswd.users

My hunch it that you should be able to overwrite the existing file with this – or you could look at it first, but I’m pretty sure it’ll not contain any clear text passwords (only hashes)… If the file’s not where it’s supposed to be, try whereis nagios or which nagios.

The recipe continues like this:
Make it available for the user who runs httpd.

# chmod o+r /usr/local/nagios/etc/htpasswd.users

Restart the httpd service.

# service httpd restart

I strongly advise you handle this suggestion with extreme care! I explicitly refuse any kind of responsibility! I’m no expert. I’d use this as a last resort; please be aware that you can cripple your Nagios installation this way (if the password file gets botched instead of overwritten, Nagios might refuse to run). It may be a good idea to talk to the Nagios people directly.

張貼在 linux、tools | 標記 create account、login、nagios | Leave a reply

ssh login don’t keyin password

Posted on 2012 年 08 月 29 日 by sc.yang
回應

a@A:~> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/a/.ssh/id_rsa):
Created directory ‘/home/a/.ssh’.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/a/.ssh/id_rsa.
Your public key has been saved in /home/a/.ssh/id_rsa.pub.
The key fingerprint is:
3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A

a@A:~> ssh b@B mkdir -p .ssh
b@B’s password:

a@A:~> cat .ssh/id_rsa.pub | ssh b@B ‘cat >> .ssh/authorized_keys’
b@B’s password:

張貼在 linux、tools | 標記 login、no password、ssh | Leave a reply

OpenVPN 連線使用本機帳號認證

Posted on 2012 年 02 月 09 日 by sc.yang
回應

Openvpn 連線使用本機帳號認證

server:

    1. 修改 server.conf 設定檔,在最後加上「plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so login」。openvpn-auth-pam.so 路徑可能會因為不同發行版而不同。
    2. 重新啟動 Openvpn Server : /etc/init.d/openvpn restart

client:

    1. 修改 client.conf 設定檔,在最後面加上「auth-user-pass」。
    2. 在連線 vpn 時就會出現登打帳號密碼的視窗,使用 Server 上的本機帳號做為驗証的動作。
參考來源:http://openvpn.net/index.php/open-source/documentation/howto.html#auth
繼續閱讀 →
張貼在 linux、tools、工作記錄 | 標記 auth、login、openvpn、password、plugin | Leave a reply

wordpress site change ip address what should been care

Posted on 2011 年 06 月 11 日 by sc.yang
回應

總會遇到這個時候,更換主機的IP位址或是更改domain name時。Wordpress應該注意什麼事情呢?在我第一次遇上這種事時(更改站台IP),發現一直無法正常登入後端的主控台。因為它將登入後的頁面通通導向舊的IP位址去了。所以我又將站台的IP更改回來,此時網頁登入就回復正常。如果IP一定要改的話,那又該如何作呢?其實最好的方法是在一開始安裝wordpress時,就將wordpress addres和site address通通以FQDN的方式填寫,不要用IP Address的方式。這樣可以免除更改IP後的一些不必要的麻煩。
繼續閱讀 →

張貼在 php | 標記 change ip address、login、mysql、wordpress | Leave a reply

近期文章

  • [轉貼] 精選部分肌能貼布的用途
  • 網路線太長訊號衰減,新舊網卡結果大不同!
  • [轉貼] Windows Live Mail 離線工作……….
  • Win2000 重新開機後,設定好的 IP 位址 會跳回 DHCP 模式
  • [轉貼] 解決 Chrome 播 Youtube lag

  • asp.net
  • bash
  • bonding
  • bug
  • c#
  • centos
  • chrome
  • codeigniter
  • command-line
  • convert
  • css
  • dd
  • disk
  • drbd
  • driver
  • easyflow
  • easyflow.net
  • error
  • Excel
  • exchange
  • find
  • firefox
  • freebsd
  • git
  • gridview
  • html
  • ie
  • ie6
  • iframe
  • IIS
  • image
  • index
  • install
  • iscsi-target
  • javascript
  • jquery
  • kvm
  • linux
  • livemail
  • login
  • logout
  • lvm
  • mail
  • mssql
  • mysql
  • nagios
  • nrpe
  • office
  • openfiler
  • outlook
  • partition
  • pdf
  • perl
  • php
  • plugin
  • postfix
  • proxmox
  • python
  • samba
  • size
  • softraid
  • sql
  • squid
  • ssh
  • tool
  • tools
  • tsql
  • ubuntu
  • update
  • vim
  • win7
  • windows
  • word
  • wordpress
  • xp

分類

  • asp.net (46)
  • bash (37)
  • browser (43)
  • css (24)
  • 生活雜記 (7)
  • easyflow (18)
  • freebsd (5)
  • html (44)
  • jquery (30)
  • linux (374)
  • mail (19)
  • network (8)
  • office (33)
  • openbsd (1)
  • perl (8)
  • php (31)
  • python (11)
  • sql (26)
  • squid (4)
  • tools (333)
  • windows (172)
  • wordpress (7)
  • 工作記錄 (111)

其它

  • 註冊
  • 登入
  • 文章 RSS 訂閱
  • 迴響 RSS 訂閱
  • WordPress.com

文章存檔

廣告
在 WordPress.com 建立免費網站或網誌.