SSH
ssh meto@127.0.0.1 -p 2222 #meto
Meto-1
ssh meto@127.0.0.1 -p 2222 #meto
generate ssh key on windows
ssh-keygen
copy the file text and past on github.com>setting
#!/bin/sh
mkdir -p /root/.ssh
chmod 700 /root/.ssh
echo ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDGYcmnh4XKivityOUI3jkvv79HDMTXVm11Zzhu+dBd1EE3GMhSW0T/7Ik7iyvbGQHZKdkbqFnsNIwIy3h5NPH0+TxG9B7uujl4kLYJOqOoo0QBmIf4x2IyvBGZbcJiCiC7k3YjJnlsj4td4rSZ41CxMj2ayXAs/vE0q9lyjRQTEwvAzRlBpCd7y0KtV965eE/scLO8U28mjE2uzuW7wb9Z5tSa6G+lbx1gCbSojBbhnCLR2tBKoAjnU1xrVXBYtarcKvIJPw5VyFQZfLRHiIWZcotBDxT6ngABaO+nWNWzfVf2jCv740TjTBj1BRoFIpTvYr4GZSgjxY8YHh7nA60d/ZSZroORH+SSBZg9KR5mg+ODY7V+b82jez0OauarcYR4M+ywY4BBIx96QxE/3U3kfpJLE3L0rFxRQ0El28eC4taViqmQ9NK6WaP4IbTFcw5kEqUlszoAsGRzmSwiXu3Bg7REpwZr+SGL/huQe/ozPSNKa2GPzbYoDqicmRIP6Ck+tmDvTE6Zki8a+vQzIO2ggKfqhNJMbOEcr580UO3jt3QdkvBpZKonwtp6REaVXsMTOG3OFidmjzIDyZ7qzWFL9WoaDU9pngFIr7B6c0f5vs9D+y1V6GpMMhS3amADGIg8Tsamu3XeX0mSzWCJgX0MSqcEZh1AnW5wJ9Rp2L4suQ== imported-openssh-key > /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): my lord Jesus
Enter same passphrase again: my lord Jesus
Your identification has been saved in /home2/fishfarm/.ssh/id_rsa.
Your public key has been saved in /home2/fishfarm/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:hcWrIydnZ8gZz3FeXHWiWCJ9CSV+rabDzH9jJ5iJbOQ
The key's randomart image is:
+---[RSA 2048]----+
| .o=oo.. +|
| =o=oo .o|
| . +oo... |
| ..o...o |
| .SB +o. |
| o X+*o. |
| * B*. + |
| Eo+ = .|
| . .o + |
+----[SHA256]-----+
#How to save ssh key of remote server
ssh-keygen (press enter / do not enter any passwords)
ssh-keyscan hpc.university.edu > known_hosts (press enter)
ssh-copy-id yourname@hpc.university.edu ( press Enter) you might need some password to go through university VPN in this case , you can enter them )
ssh computerName@serverIP
NAME
ssh — OpenSSH SSH client (remote login program)
SYNOPSIS
ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-Q cipher | cipher-auth | mac | kex | key] [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command]
DESCRIPTION
ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network. X11 connections and arbitrary TCP ports can also be forwarded over the secure channel.