Tagged: SSH

sudo as root X11 connection rejected because of wrong authentication

I received this problem recently when I logged into root on a machine. X11 connection rejected because of wrong authentication How did this problem happen? Here’s what I did. ssh -X huyle@host sudo su xclock X11 connection rejected because of wrong authentication If I open xclock as a user, then X11 works just fine. As a result, I know that the server and client’s X11 forwarding is working. A root problem My .Xauthority and X11 credentials aren’t being passed over to root. ssh...


How to Create SSH Keys for Secure SSH Access

Create SSH keys for SSHing SSH keys allow you to SSH into a machine without a password prompt. Before we create our SSH key, make sure that we have a ~/.ssh folder. If not, create the ~/.ssh folder. mkdir ~/.ssh Now, we can use the following command to generate an SSH public key and private key: ssh-keygen -t rsa -b 4096 -C “your_email@example.com” -t represents the encryption scheme. -b represents the number of bits. -C is used for e-mail identification. You...


How to Setup Shortcuts for SSH

Instead of using SSH on an IP address that you’ll definitely forget, you can use shortcuts instead! For instance, instead of typing: ssh username@ Wouldn’t you rather do something like:

  Creating SSH shortcuts To create shortcuts, you have to create a file inside your home directory’s .ssh folder called config.

If the ~/.ssh directory does not exist.

Now, we can create the config file.

For every IP address that you want to add a shortcut, add...