I was using cloudflare's 126.96.36.199 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.
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:
which gives the syntax for the command:
sshfs [user@]host:[dir] mountpoint [options]
Another tool in the wonderful ssh toolbox!
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.
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...
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:
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 ...
There exists an utility to print the idle time of the X screen:
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
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=338 a...
Here is an iptables rules creating script:
# ask1368071 Smythies 2021.10.08 Ver:0.01
# See here:
# run as sudo on s19.
# log entries are only for each NEW ssh packet. It seems unreasonable ...
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
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 ...
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.
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
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 ...
Another way is to use the tee command.
tee - read from standard input and write to standard output and files
tee [OPTION]... [FILE]...
Copy standard input to each FILE, and also to standard output.
append to the given FILEs, do not overwrite
So, for your command you could do ...
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 ...
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 ...
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 ...
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 (...
As you have already tried, it's definitely worth trying ssh to your localhost, to see if it's listening locally:
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.
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. ...
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
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 ...
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 ...
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:
This is a bug in WSL2 installations of git.
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.
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:
proxy = http://xxx.xxx.xxx.xxx:pppp
If that doesn't work and if you are using a VPN, drop ...
I had the same problem, and solved it by ading this two lines:
seems like sshpass is actually reading that file instead of having an -o option
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 ...
After searching, finally found this fix!
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....
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 ...
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 ...
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/...
There is a script here to do this:
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 ...
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 ...