ssh-config

ssh config: can I have 2 host wildcards?

ssh config: can I have 2 host wildcards? Simplified Example: host one user cat host two hostname 2 host three hostname 3 host * hostname 1 host * user apple identityFile ~/.ssh/id_rsa host y hostname 7 host t hostname 8 host * user duck identityFile ~/.ssh/quack Is this possible? The hosts above the 1st host …

Total answers: 1

Can i used these aliases in some sort of config file?

Can i used these aliases in some sort of config file? I have many of these kinds of aliases, the part before = is the host in ssh config alias sshConfigHost=’ssh -t hostname docker exec -it containerName bash’ Could I add these to some sort of config file? The hostname is defined in ssh config …

Total answers: 1

ssh config: can I replace proxy command?

ssh config: can I replace proxy command? Here is my standard work ssh config which everyone uses: host go User user ProxyJump otherHostname StrictHostKeyChecking=no UserKnownHostsFile=/dev/null IdentityFile ./ssh/key ProxyCommand ssh -i ~/.ssh/key -W %h:%p otherUser@OtherHostname The proxyCommand part bothers me as the whole point of an ssh config is to have no use for commands. Are …

Total answers: 1

Create ssh config to VNC server with tunnel via intermediate machine

Create ssh config to VNC server with tunnel via intermediate machine I recently found out about ssh config file where one can setup frequently used ssh connections. However, I am having troubles transforming one command which connects my computer to VNCServer running on my server which is hidden behind intermediate server. Basically transform this command …

Total answers: 1

How to bypass RemoteCommand option in ssh_config

How to bypass RemoteCommand option in ssh_config I have defined a ssh_config file with all the hosts to which I connect on a regular basis. I like to start/connect to a tmux session upon connection to the host, so I’ve added the line RemoteCommand tmux new -ADs remote in my config. The problem is that …

Total answers: 4

Specify Specific Identity file when ssh'ing as certain user in ~/.ssh/config

Specify Specific Identity file when ssh'ing as certain user in ~/.ssh/config I would like to specify a specific identity file based on the user I am ssh’ing as to a server. For example when ssh as user1 from host 1 to host 2 as user1 [user1@host1 ~]$ ssh user1@host2 I would like to use a …

Total answers: 1

What is the .ssh/config corresponding option for ssh -N

What is the .ssh/config corresponding option for ssh -N I want to set up an alias in my config file that has the same result as this command: ssh -N devdb -L 1234:127.0.0.1:1234 My .ssh/config entry for devdb: Host devdb User someuser HostName the_hostname LocalForward 1234 127.0.0.1:1234 What do I put in the above config …

Total answers: 3

Midnight Commander: sftp connection using aliases from ssh config

Midnight Commander: sftp connection using aliases from ssh config Problem description I try to connect to remote server in one of two panels of Midnight Commander using SFTP link… submenu. Unfortunately, mc does not pass my ~/.ssh/config file to sftp. Therefore typing sftp://myhostalias results in error message Cannot chdir to “/sftp://myhostalias” Here is a content …

Total answers: 1

.ssh/config ProxyCommand with a variable port

.ssh/config ProxyCommand with a variable port In the environment I work in, we use tunnels to SSH to various servers. For example, I’ll ‘ssh -p XXXXX username@localhost’ to reach the server. If the port was always the same, I could do this, and I’d be done: Host somehost User bryan Hostname localhost Port 12345 ProxyCommand …

Total answers: 1

Remote command in ssh config file

Remote command in ssh config file I’d like to set ssh_config so after just typing ssh my_hostname i end up in specific folder. Just like I would type cd /folder/another_one/much_much_deeper/. How can i achieve that? EDIT. It’s have been marked as duplicate of “How to ssh into dir…” yet it is not my question. I …

Total answers: 3

SSH with a bastion host and different usernames

SSH with a bastion host and different usernames I want to log into a linux server using two sequential bastion hosts. My .ssh/config file looks something like this: Host * User username0 Host hostname0 Hostname foo Host hostname1 Hostname bar Port 0 ProxyCommand ssh -W %h:%p hostname0 Host hostname2 User username2 Hostname bat Port 1 …

Total answers: 1