New answers tagged

0 votes

How to prevent gnu screen capturing the mouse?

You can turn off Screen’s mouse tracking in the current session with a command: Press Ctrl+A and type :mousetrack off To keep this mode after detaching from and reattaching to this Screen session, use ...
user avatar
  • 111
1 vote

Ovveride shell for commands in ssh config (~/.ssh/config)

You can either specify an alternative command that begins with bash -c, or drop your Bashism (namely &> stdout-and-stderr redirection). The Match exec uses something like the system() C ...
user avatar
  • 8,856
0 votes

Sharing the same `ssh-agent` among multiple login sessions

I know this is an old thread, and there are a lot of solutions already suggested. I just wanted to provide my super simple solution to this. In my shell's profile file I simply put this: function ...
user avatar
0 votes

Remotely access an Ubuntu machine from macOS

If you just want command-line access, you can SSH in. If you want to use the graphical desktop environment (with a mouse, etc.), you can use VNC to get in. VNC is a fairly universal de facto standard ...
user avatar
  • 96.6k
0 votes

Unable to connect to server using Putty

I faced the same problem the solution was simple just run this in your server sudo ufw allow ssh
user avatar
1 vote

how to run ssh-agent in fish shell?

There are two parts to your question: Why do you get an error when attempting eval `ssh-agent -s` ? How to enable ssh-agent in the Fish shell For the first, the feature you are looking for is called ...
user avatar
  • 7,704
0 votes

how to run ssh-agent in fish shell?

I get this solution run eval (ssh-agent -c) reference:https://wiki.archlinux.org/title/Fish#Evaluate_ssh-agent
user avatar
0 votes

how can I find the ubuntu username and password for ssh from my windows 10 laptop

Check that the Ubuntu account is authorised for ssh. Check if it belongs to the ssh group. If not, you'll need to add the user to the ssh group.
user avatar
0 votes

Remote port forwarding through ssh stopped working on windows server 2019 after update

After running ssh with -v flag I've noticed that it tries to use ipv6 localhost. I've changed my ssh command to: ssh -R "remote-port:127.0.0.1:local-port" remote-ip and it worked! Not sure ...
user avatar
  • 131
3 votes

(Dis-)Advantages of using generic git user for SSH based access

If you only create an account named "git" and do nothing else with it then it's not much of advantage. Indeed it would often be better to use individual accounts (allowing you to control ...
user avatar
  • 376k
1 vote

Execute remote command

What you need is a feature called SSH multiplexing, i.e. the re-use of a single existing TCP connection for multiple SSH sessions. Here's an example of how you can enable this in your ssh_config: Host ...
user avatar
  • 207
1 vote

why is ssh ignoring user config file

Use the Host identifier in the config file and then it will use whatever is specified in your config for that Host (not the same as DNS name). eg: Host github HostName github.com IdentityFile ~/.ssh/...
user avatar
  • 11
1 vote

Is it possible to resolve addresses in an SSH session using the client's network?

I know I can use a SOCKS 5 proxy to resolve URLs on the client using the remote's network, can that be reversed? ssh -D 1337 myuser@example.com Like the reverse of -L is -R, the reverse of -D is… -R. ...
user avatar
0 votes

PAM authentication error when trying to log in via SSH to FreeBSD on VirtualBox

You need to modify two files (uncomment and enable options): vi /etc/ssh/ssh_config PasswordAuthentication yes vi /etc/ssh/sshd_config PermitRootLogin yes Then, restart the sshd deamon: service ...
user avatar
  • 621
2 votes
Accepted

How to specify TCP congestion algorithm to use for my long running rsync process?

If the destination is known, specify the congestion control algorithm as a route option: ip route add <ip_addr>/32 via <gateway> congctl lp Alternatively, LD_PRELOAD a library that calls ...
user avatar
  • 376k
0 votes

~/.profile is not loaded when using SSH (Ubuntu)

ssh localhost 'echo $MyEnv' ssh with command will try to source $BASH_ENV according to gnu bash manual because it is a non-interactive shell I think https://www.gnu.org/software/bash/manual/bash.html#...
user avatar
  • 1
2 votes

scp recursive upload is incomplete

scp is a great tool, but for large collections of files, I reccomend you try rsync. rsync will operate over ssh, so you should need no more configuration on your system, other than perhaps getting a ...
user avatar
0 votes

How to change the Git SSH password remember setting?

There is no such setting – the behavior is just based on the current existence of a "remembered" password. GNOME Keyring attempts to load all keys from ~/.ssh/id_*. If the keyring contains a ...
user avatar
  • 376k
0 votes

With cygwin, how do you restart an ssh reverse tunnel without a forwarding issue "Warning: remote port forwarding failed" message occurring?

I figured that if I can kill an unwanted established connection it could help. And this can be done here as I that each connection has its own SSHD process. I can't see which connections are SSH -L or ...
user avatar
  • 21.8k
1 vote

Make IP address of WSL2 static

I have not enough reputation to comment then I put my own answer but approved answer by Nick (https://superuser.com/a/1619390/1023342) is the good one for me, expect for one small detail, for me wsl ...
user avatar
2 votes
Accepted

SSH ~/.ssh/.config file doesn't work

The content looks fine so far but the config file usually is ~/.ssh/config as described here.
user avatar
0 votes

permissions of id_rsa.pub as 644 (-rw-r--r--) but the parent folder .ssh as 700 (drwx------)

FWIW, the point of having a 644/664 access on the .ssh/id_rsa.pub file is to make it easy to be shared from there (its point of creation and reference). This access is based on the user umask setting....
user avatar
  • 54.4k
0 votes

permissions of id_rsa.pub as 644 (-rw-r--r--) but the parent folder .ssh as 700 (drwx------)

These permissions are hard-coded in OpenSSH. Keep in mind that you could run ssh-keygen from anywhere, saving keys to any writable location. By using these permissions, ssh-keygen makes sure the ...
user avatar
  • 53.6k
1 vote

Running all traffic to bypass local firewall

Make sure you have the correct type; when you use the "dynamic tunnel" feature in SSH clients, they provide a SOCKS proxy – but the one you're configuring in Windows is probably expected to ...
user avatar
  • 376k
1 vote

ssh agent forwarding on Windows 10

SSH-Agent is disabled by default on windows. From [OpenSSH key management][1] article # By default the ssh-agent service is disabled. Allow it to be manually started for the next step to work. # Make ...
user avatar
  • 11
0 votes

Centralizing SSH access to many devices?

In your first scenario, you have Client --SSH-> Server Client waits for SSH session from server using this connection Server --SSH-> Client, runs commands, etc This is called an ssh reverse ...
user avatar
  • 1,758
3 votes
Accepted

scp : "unexpected filename: . ", but I don't see a "."

scp like cp supports copying from multiple sources to a single target directory. In your command scp -r /opt/PEAS/linPEAS/linpeas.sh jan@10.10.87.42: /dev/shm /opt/PEAS/linPEAS/linpeas.sh and jan@10....
user avatar
0 votes

SSH ignore global config

You could use -F none to simply avoid reading any configuration files. If you want to make it an alias: alias ssh='ssh -F none'
user avatar
  • 220
0 votes

scp : "unexpected filename: . ", but I don't see a "."

/dev/shm is the shared-memory of Linux, that can be addressed as a disk. It is not an SSH server. You should be using: scp -r /opt/PEAS/linPEAS/linpeas.sh /dev/shm But I'm not sure that this is what ...
user avatar
  • 406k
0 votes

Showing the output of a named pipe from VirtualBox

I believe PuTTY has its own SSH implementation, rather than just being a frontend to OpenSSH. But it also supports Telnet, serial ports, and other things. So it can perhaps be better thought of as a ...
user avatar
  • 6,700
1 vote

Putty Remote portforwarding not reaching localhost

I figured it out, it was indeed the GatewayPorts variable in my server's sshd_config file. In the case of a google vm instance this file is located two directories back from where you start and in /...
user avatar
2 votes
Accepted

invalid config for cloud-init but apparently still works -- how do I remove the warning?

If you look at the docs, the key name is ssh_authorized_keys rather than ssh-authorized-keys. The latter is deprecated, though it looks like a deprecation warning was missed. This should work with no ...
user avatar
  • 496
1 vote
Accepted

How do I get Bitvise WinSSHD to provide me with a CMD console when I log in? SSHing to a Windows machine.(from a windows machine too)

I assume you are using a recent Bitvise SSH Server version. The current most recent version is 9.23. The last version that used the name WinSSHD was 5.26 (from 2011). If you are seeing bvshell come up ...
user avatar
0 votes

Run a remote command using ssh config file

I use the following in .ssh/config: RemoteCommand cd ~/mydir;bash RequestTTY force
user avatar
  • 141
0 votes

When I try to log in with SSH, why am I getting the error, Permission denied (publickey)

You should check the permissions of your key files. ssh is very strict about them and can refuse to use them for authentication. .ssh directory: 700 (drwx------) public key (.pub files): 644 (-rw-r--...
user avatar
0 votes

Finding sshd log file

You write How can I debug my situation without using deep network sniffing ? Is it possible to redirect Sshd output to a logfile or std ?" Well, you could include in your troubleshooting and ...
user avatar
  • 21.8k
-1 votes

When I try to log in with SSH, why am I getting the error, Permission denied (publickey)

Well, as user1686 pointed out, some of what you write doesn't make sense, in that your method and logic doesn't make sense, and they identified that and had some good solutions, i'm going to write on ...
user avatar
  • 21.8k
0 votes

PuTTY Fatal Error: No supported authentication methods available

I can't say for sure whether this will resolve every incidence, and it certainly isn't the solution for cases where the public key hasn't been entered in the authorised_keys file on the server. I ...
user avatar
  • 1,043
2 votes
Accepted

Hosting a Linux server on Windows

Separate your Dev Environment I think the best option is one where you can build, destroy, rebuild your dev environment without taking your primary Win PC offline either through dual-boot, or worse ...
user avatar
2 votes

Hosting a Linux server on Windows

Only a VM can fulfill all the conditions. The condition of direct access to a GPU is the most difficult, called GPU passthrough, is a feature in the newer versions of VirtualBox and Hyper-V on newer ...
user avatar
  • 406k
2 votes

Hosting a Linux server on Windows

Hosting a Linux server on Windows 1 and 3 are special purpose devices and not general purpose virtualizers. I suggest a professional virtualizing app: VMware Workstation Pro or Hyper-V. I have both ...
user avatar
  • 36.2k
1 vote

Sending command: scp -v -t / exec request failed on channel 0

debug1: Remote protocol version 2.0, remote software version Serv-U_15.3.1.155 According to this line, you're apparently connecting to a server product named "Serv-U" by Solarwinds. ...
user avatar
  • 6,890
1 vote
Accepted

Unable to ssh with key into my Synology NAS

ssh -p '9922' -i /opt/duplicati/config/.ssh/id_rsa.pub 'user@192.168.1.1' Your actual issue is that you're using the wrong key file for the "-i" parameter. The file with the ".pub"...
user avatar
  • 6,890
0 votes

Unable to ssh with key into my Synology NAS

Here's a related openssl GitHub issue and a serverfault question. In both situations, generating a new key seems to have worked. This could feasibly be caused by a compatibility or corruption issue.
user avatar
0 votes

How to use SSH and VPN in combination in single ssh command?

So VPNs are inherently unaware of anything above the third layer of the OSI model, meaning they can't see what ports or protocols are being used. It may be possible to do some firewall magic to ...
user avatar
0 votes

By default, does ssh-copy-id -i blah.pub user@host, log in with the private key form of the public key specified by -i, or with ~/.ssh/id_rsa?"

Does ssh-copy-id -i blah.pub user@host, log in with the private key form of the public key specified with -i, or does it log in with ~/.ssh/id_rsa?" It won't log in with the private key form of ...
user avatar
  • 21.8k
0 votes

To use ssh-id-copy do you need both id_rsa.pub and id_rsa?

Yes it needs both.. In theory though, it shouldn't need both, but it checks that the private key form of the public key specified with -i, is there, as a "safety check". So that if a user ...
user avatar
  • 21.8k
1 vote

How to use SSH and VPN in combination in single ssh command?

However, I do not want all my data traffic to go through this VPN. Using GNU/Linux, which tools do I use to use a VPN only in one specific ssh connection? Change your OpenVPN client configuration to ...
user avatar
  • 376k
0 votes

How to access files on a Linux computer from a Windows PC in a graphically way

You can use Mobaxterm Home Edition. When you open a new ssh session you have next to the terminal a ssh browser and you can drag and drop files from/to it.
user avatar
0 votes

Bad owner or permissions on ssh config file

If your home directory is mounted on NFS and there is an NFS problem or a Domain login problem, it could be that the ~/.ssh/config file is owned by nobody (temporarily, until the NFS or Domain loging ...
user avatar
  • 6,871

Top 50 recent answers are included