1. Create a public and private key on your computer (id_rsa, id_rsa.pub)
ssh-keygen -t rsa
2. Copy public key to the server
scp id_rsa.pub <username@host>:~/.ssh/
3. Login server
ssh username@host
4. Check to see if the .ssh directory and authorized key directory exists
4a. If they do not exist:
mkdir ~/.ssh
chmod 700 ~/.ssh
cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
rm ~/id_rsa.pub
4b. If they do exists
cat ~/.ssh/id_rsa.pub >> .ssh/authorized_keys
rm ~/id_rsa.pub
Notes:
id_rsa: private key
id_rsa.pub: public key
Configuring Aliases to Servers¶
So that you don't have to long in
1. create a file called config in your ~/.ssh directory
Host dev
HostName 10.0.1.1
User <your_username>
Host stage
HostName 122.100.2.246
User <your_username>
Host prod
HostName 122.100.2.237
User <your_username>
and now you can used
ssh dev
to login
分享到:
相关推荐
1. **备份私钥**:将本地的私钥文件(位于`C:\Documents and Settings\uplinux\Application Data\SSH\UserKeys`)备份至安全位置,如手机或U盘,并压缩成带密码的压缩包,以防系统重装后的需要。 2. **关闭密码登录...
使用命令“ssh-keygen -i -f uplinux_key.pub >> authorized_keys”将公钥添加到authorized_keys文件中。然后,我们需要删除生成的文件和authorization文件。 保护密钥 我们的密钥文件非常重要,需要保护好。我们...
登录GitHub,进入个人设置(Setting),然后选择左侧菜单的"SSH and GPG keys",添加新的SSH Key,标题自定义,Key粘贴之前复制的内容,最后点击"Add SSH key"。 配置完成后,测试SSH连接是否成功。在Git Bash中...
可编辑的文档,docx格式,便于复制、粘贴、翻译 Foreword . . . . . . . . ....Preface ....Configuring SSH Keys 11 Forking the Sample Repository 12 Starting Up Jenkins 13 Configuring the Tools 17
六、 Setting up secure access Core FTP Server 中的安全访问是通过SSL/TLS 加密来实现的。用户可以设置安全访问密钥,以确保数据传输的安全。 七、 Blocking Access / Access rules Core FTP Server 中的访问...
1. **Setting Up SSH:** - Ensure that the SSH service is installed and running: ```bash sudo yum install openssh-server sudo systemctl start sshd sudo systemctl enable sshd ``` - Edit the SSH ...
- On-device help on creating a new connection in the Menu when setting up connections - On-device help on available input modes in the Menu when connected - Recommended with Hackers keyboard from ...
- **Setting Up a Git Server**: Set up a server, install Git, and configure the necessary components such as SSH keys for authentication. - **Access Control**: Implement access control using groups and...
This is a convenient feature when you're manually comparing files, when you want to copy/paste between multiple files, or when you simply want to divide up your edit space. Tabbed Child Windows ...
Looking up Holidays Automatically Recipe 3.7. Fuzzy Parsing of Dates Recipe 3.8. Checking Whether Daylight Saving Time Is Currently in Effect Recipe 3.9. Converting Time Zones Recipe 3.10. ...
HFC, rates up to 42.8 Mbps and upstream rates of up to 30.7 Mbps, bandwidth is shared. FTTH: 2-10Mbps upload; 10-20 Mbps download; bandwidth is not shared. 10. There are two popular wireless ...
Table of Contents Preface, Notes, Licenses . . . . . . . . ....1. Licenses for Third-Party Components ....1.1. FindGTest.cmake License ....1.2. LPeg Library License ....1.3. LuaFileSystem Library License ....