Posts

HOWTO - Create New SSH User

Image
  Create a New SSH User: Create a new user on your server for the person who needs to SSH in. You can do this using the adduser command. For example:           sudo adduser newuser      Follow the prompts to set up a password and other details for the new user. Grant Sudo Privileges (Optional): If the user needs administrative privileges, you can add them to the sudo group. This allows them to execute commands with superuser privileges. Use the usermod command:      sudo usermod -aG sudo newuser Provide Public Key: Ask the user to generate an SSH key pair on their local machine (if they haven't already) using the ssh-keygen command. They will have a private key (usually named id_rsa ) and a public key (usually named id_rsa.pub ). Send Public Key to You: Have the user send you their public key. This is typically the content of the id_rsa.pub file. They can use a secure method like encrypted email or a secure messagi...

HOWTO- Generate SSH Key

Image
  Generate SSH Key Pair: Type the following command to generate an SSH key pair. The -t option specifies the type of key to create (in this case, RSA), and the -b option specifies the number of bits in the key (2048 is a common choice). ssh-keygen -t rsa -b 2048 Press Enter. It will prompt you for a location to save the key. The default location is usually fine, so just press Enter. It will also ask you to enter a passphrase. This is an additional layer of security. You can enter a passphrase or leave it blank, but using a passphrase is recommended for better security. Locate Your SSH Key: By default, the keys are stored in the ~/.ssh/ directory. Your private key will be named id_rsa and your public key will be named id_rsa.pub . Display Your Public Key: You can view your public key using the following command: cat ~/.ssh/id_rsa.pub Copy the output. Add the Public Key to the Remote Server: Log in to your remote server. Navigate to the ~/.ssh/ directory (create it if it doesn'...

HOWTO - SSH via Mac Terminal

Image
  To connect to SSH via the Mac Terminal, follow these steps: 1. Open Terminal: You can find it in Applications > Utilities > Terminal, or you can use Spotlight by pressing Command + Space, typing "Terminal," and hitting Enter. 2. Use the ssh command: The basic syntax is ssh username@hostname . For example, if your username is "myuser" and the IP address of the remote server is "123.456.789.0," you would type: ssh myuser@123.456.789.0 If you're connecting using a domain name, you can replace the IP address with the domain. 3. Enter your password: Once you press Enter, Terminal will ask for your password. 4.Type it in (you won't see any characters on the screen as you type for security reasons) and press Enter. And that's it! You should now be connected to the remote server via SSH. Remember to replace "myuser" and "123.456.789.0" with your actual username and the IP address or domain of your SSH server. If your serv...