New answers tagged

0

I was using cloudflare's 1.1.1.1 for faster dns lookups and after 30 hours of hard work I found that Cloudflare cli changes your ip also in linux so all I did was enabled dns only mode and everything is working fine now.


2

You can mount the remote file system over ssh using sshfs command, then interact with it as if it were a local system. There is a man page here: https://linux.die.net/man/1/sshfs which gives the syntax for the command: sshfs [user@]host:[dir] mountpoint [options] Another tool in the wonderful ssh toolbox!


1

You may need to set the CA certificate to be part of the WiFi connection properties. Generally you can do it like this: Note: This answer is making the assumption that you are using Ubuntu Desktop 20.04 LTS. If you are not using this version of Ubuntu, some of the screenshots may appear different from what you see. The basic steps remain the same, though. ...


1

Just append this: iptables -A INPUT -j LOG --log-prefix "BLOCKED TRAFFIC > " --log-level 4 iptables -A INPUT -j DROP Packets not matched by previous ACCEPTs (or DROPs) will be processed and so get LOGged and then DROPped...


3

If you came here because Bitbucket returns the following after an update to OpenSSH 8.8: Unable to negotiate with <ip address> port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss you should NOT enable DSS (like in the accepted answer), but rather RSA in ~/.ssh/config: Host bitbucket.org HostKeyAlgorithms +ssh-rsa ...


1

I think the only way you're going to know for absolutely sure is to "spy" on their screen. Install x11vnc on their computer with sudo apt-get install x11vnc net-tools (Optional) Create a shell script on their computer to automate the process of starting the server, so you don't have to remember the syntax every time. Note that the -auth parameter ...


24

There exists an utility to print the idle time of the X screen: DISPLAY=":0" xprintidle It prints the time since last keyboard or mouse input in milliseconds. Another option would be to pop up a question box: DISPLAY=":0" zenity --question --text="Organic Marble asks: Are you currently using this computer?" && echo yes ...


6

Well... this is only an idea, but if you login via ssh to the same user that your relative is using, set the DISPLAY environment variable to :1 and run xinput test n where n is the number corresponding to the mouse (you can obtain that number with xinput --list, in my case it's 9), then that command will print a line of text (in form like motion a[0]=338 a[1]...


8

If the monitor is configured to save energy, you may check it: xset -display :0 q Look at last line: Monitor is Off


0

Here is an iptables rules creating script: #!/bin/sh FWVER=0.01 # # ask1368071 Smythies 2021.10.08 Ver:0.01 # See here: # https://askubuntu.com/questions/1368071/iptables-that-only-allow-incoming-traffic-to-openssh-and-block-all-other-traffic # run as sudo on s19. # log entries are only for each NEW ssh packet. It seems unreasonable ...


1

The simplest way to do this would be like this: Open Terminal (if it's not already open) Block all incoming traffic: sudo ufw default deny incoming Allow OpenSSH: sudo ufw allow OpenSSH If SSH connections are coming in from a limited subset of IPs, such as an internal network, then you can limit OpenSSH to just the local network like this: sudo ufw allow ...


0

Thats because private gitlab repo doesn't allow ssh from 443 and ISP doesn't allow port 22 for ssh. For those private repo which allow 443 this solution will work. I should be looking for some Jump server sloution where I can use the middle jump server's port 443 then ssh to port 22 of targeted server from there.


0

After implementing everything mentioned above, I finally found that a server reboot works for me. I am assuming this was cache? But it was weird for me at least.


0

The OTRS group discontinued their open source activities. You will find the old packages and the packages for Znuny, a fork, at https://download.znuny.org/releases More details at www.znuny.org


0

You need to specify on the client side which key to use. You can do this either with ssh -i PATH_TO_PRIVATE_KEY, or via a configuration file, the latter being much more convenient. Here's an excerpt from my ~/.ssh/config which applies to github: Host github github.com HostName github.com User git PasswordAuthentication no IdentityFile ~/.ssh/...


0

Despite the answer has been already given, let me share how I manage to fix it. 1.ssh-add -D remove all the RSA entries. 2.vi ~/.ssh/known_hosts remove all the rows manually. Press dd for each row. 3.ssh-keygen -q -f ~/.ssh/xyz_rsa -t rsa create xyz_rsa and xyz_rsa.pub files 4.ssh-copy-id -i ~/.ssh/xyz_rsa user@server_address copy your private key from your ...


2

Another way is to use the tee command. NAME tee - read from standard input and write to standard output and files SYNOPSIS tee [OPTION]... [FILE]... DESCRIPTION Copy standard input to each FILE, and also to standard output. -a, --append append to the given FILEs, do not overwrite So, for your command you could do ...


2

Like this sudo su -c "echo 'UUID=X /mnt/test ext4 defaults 0 1' >> /etc/fstab" Mind that a script like this should be used by user root and not your admin so that would negate the use of sudo. I am more into doing it like this: grep -q '/mnt/test' /etc/fstab || printf 'UUID=X /mnt/test ext4 defaults 0 1\n' >> /etc/fstab using user ...


4

You can actually do this, although I can't imagine any reason why you would want to. You can create a new user with the same user ID (UID) as root. Note that this isn't actually a "new" user, it is just a different user name for the same user. However, you will be able to log in using this name instead of root. First, create a new user and set ...


2

From a safety perspective, what you want to do obviously is not done and highly recommended against. Still, it is possible in linux to have different user names representing the same user. So if you want to set up a user name that can act fully as root, you can in principle make a different login name for the root user. One of the reasons why it is extremely ...


2

By poking around, the bad guys have found out that your external port 54321 is your ssh access port. The ports listed in your log are their source ports, not the destination ports. You should find that ssh login attempts on your port 54321 occur at a much much lower rate than if it were port 22. You can mitigate the issue via iptables rules, or fail2ban (...


0

As you have already tried, it's definitely worth trying ssh to your localhost, to see if it's listening locally: ssh username@localhost If this works but you can't get it from another computer, it's probably something with your network connection, including firewwall In your case, this doesn't work so it's unlikely to be network connection or firewall. Have ...


3

The pam_time module is designed for this. Add pam_time as the first account statement in the ssh pam config. This command will insert the statement account required pam_time.so just above the line @include common-account. sed -i -e '/^.include common-account/i account required pam_time.so' /etc/pam.d/sshd configure /etc/security/time.conf as desired. ...


0

I added a -N to the command to get this to work. -N tells autossh to connect and do nothing. Without it my ssh session was logging in then immediately exiting. I also set it up to use a local user along with a .ssh/config file (/home/myuser/.ssh/config) which contains my tunnel rules. # cat /etc/systemd/system/autossh.service [Unit] Description=...


3

Use a cron job to stop and start the ssh server at specific times. For example create a file /etc/cron.d/start-stop-ssh with the following contents: 0 9 * * * root /usr/sbin/service ssh start 0 17 * * * root /usr/sbin/service ssh stop This will start the ssh service everyday at 9:00 and stop it everyday at 17:00. Please note that when the service is stopped ...


2

You have to visit /etc/apt/sources.list.d directory, locate *.list files here and find lines ending with # disabled on upgrade to focal. Be careful - some third-party repositories may not have packages for current Ubuntu versions. For example uncommenting lines like "# deb http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu focal main # disabled on ...


0

solution: use double \ instead of double / I'm an idiot I know feel free to laugh at me, got too used to using Linux


0

Connection achieved! As suggested by Thomas Ward, loading the private_key file to PuTTYgen on Windows and copying the public key to the authorized-keys file worked as a first step. Moreover, exporting the private_key file as openssh format, the first option, to private_OpenSSH file and then move it to the ~/.ssh directory to change permissions with: chmod ...


1

This is a bug in WSL2 installations of git. See here I'm guessing you are using Git inside of WSL. If so, be sure to add your issue to the feed in the link. Even if it has already been said many times in the same feed, they judge priority based at least partly on community feedback. Your voice is important here.


2

Install missing packages with the following command. sudo apt install build-essential nghttp2 libnghttp2-dev libssl-dev If that doesn't work check if Ubuntu is behind a proxy, and if so modify ~/.gitconfig adding the proxy configuration: touch ~/.gitconfig [http] proxy = http://xxx.xxx.xxx.xxx:pppp If that doesn't work and if you are using a VPN, drop ...


0

I had the same problem, and solved it by ading this two lines: UserKnownHostsFile=/dev/null StrictHostKeyChecking=no in /etc/ssh/ssh_config seems like sshpass is actually reading that file instead of having an -o option


2

To use a reverse tunnel automatically it is recommended to use autossh service. I recommend to follow those steps: Change keys between the servers you want to tunnel. save your server A public_key on your server B /home/user/.ssh/authorized_keys file. make the first connection manually with ssh user@serverB and see the connection is working fine. do the ...


-1

vi /etc/ssh/ssh_config KexAlgorithms diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1


0

After searching, finally found this fix! https://djangocas.dev/blog/linux/troubleshooting-protonvpn-EnableIPv6LeakProtectionError-Unable-to-add-IPv6-leak-protection-connection-interface/ To fix this issue, we need add a PolicyKit rule for the NetworkManager. Use root to create a file name /etc/polkit-1/localauthority/50-local.d/org.freedesktop.NetworkManager....


1

In my opinion, the more keys you have on the device, the wider the attack surface. Only one key needs to leak, and now you have more that CAN leak. In some situations that makes sense, but I'm not sure what you're gaining in the scenario you described. If SSH key A is compromised, someone with that key can gain access to the device. Period. SSH key B, which ...


5

As an IT Security expert, the proper response to any security risk of a compromised machine is: Disable the affected system(s) (shut them off entirely, or disconnect them from the network immediately and isolate them if you intend to dissect the system and the breach), and nuke it from orbit to clean it. Nuke it clean, restore important stuff from clean ...


1

I would prefer to use the autossh package for such service. So first install it: sudo apt update && sudo apt install autossh Then create configuration entry for your connection, by creating a new file within the directory /etc/ssh/ssh_config.d/. Let's call it reverse.ssh.www.example.org.conf. Here is an example: sudo nano /etc/ssh/ssh_config.d/...


0

There is a script here to do this: https://github.com/tool-maker/VPN_just_for_torrents/wiki/Maintaining-SSH-Access-Using-a-VPN-on-a-Remote-Linux-Server It ensures that when a connection to the real IP interface is made, even if it is not the default gateway interface anymore, response packets for the connection go back on the real interface again. It uses ...


1

The nohup Wikipedia Page has a reference to this issue specifically: Note that nohupping backgrounded jobs is typically used to avoid terminating them when logging off from a remote SSH session. A different issue that often arises in this situation is that ssh is refusing to log off ("hangs"), since it refuses to lose any data from/to the ...


0

$ scp -i example.pem -r sourcefilr.txt ubuntu@10.12.3.4:/example_folder Before executing this command we need to give full permissions to example_folder: $ sudo chmod 777 example_folder


Top 50 recent answers are included