Non-default location for ssh config file in Linux
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
How can I tell ssh
to look for config file in a location other than the default one: ~/.ssh/config
?
linux ssh
add a comment |Â
up vote
2
down vote
favorite
How can I tell ssh
to look for config file in a location other than the default one: ~/.ssh/config
?
linux ssh
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
How can I tell ssh
to look for config file in a location other than the default one: ~/.ssh/config
?
linux ssh
How can I tell ssh
to look for config file in a location other than the default one: ~/.ssh/config
?
linux ssh
linux ssh
asked yesterday
motam79
1296
1296
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
-F configfile
Specifies an alternative per-user configuration file. If a configuration file is given on the command line, the system-wide configuration file (/etc/ssh/ssh_config) will be ignored. The default for the per-user configuration file is ~/.ssh/config.
Source: https://linux.die.net/man/1/ssh
This works but every time I need to enter the config file path. Is it possible to store this option as default somewhere?
– motam79
yesterday
@motam79 quoting: "[...] the system-wide configuration file (/etc/ssh/ssh_config) will be ignored.". Without system-wide file, you can't store this anywhere. (This is my own assumption without any hard evidence and testing!)
– Ismael Miguel
yesterday
@motam79 If you're only starting ssh manually from the command line, you can make a shell alias. If you use other stuff (scripts, binaries, whatever) that look for ssh on the path, you could drop a wrapper script somewhere that has a higher priority than the real binary.
– pt314
yesterday
add a comment |Â
up vote
3
down vote
As of OpenSSH 7.3p1, you can Include other config files in ssh_config.
So, you could add to /etc/ssh/ssh_config:
Include ~/custom_ssh.conf
Don't think this will stop the default ~/.ssh/config from being loaded, however.
New contributor
C. Furlani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
-F configfile
Specifies an alternative per-user configuration file. If a configuration file is given on the command line, the system-wide configuration file (/etc/ssh/ssh_config) will be ignored. The default for the per-user configuration file is ~/.ssh/config.
Source: https://linux.die.net/man/1/ssh
This works but every time I need to enter the config file path. Is it possible to store this option as default somewhere?
– motam79
yesterday
@motam79 quoting: "[...] the system-wide configuration file (/etc/ssh/ssh_config) will be ignored.". Without system-wide file, you can't store this anywhere. (This is my own assumption without any hard evidence and testing!)
– Ismael Miguel
yesterday
@motam79 If you're only starting ssh manually from the command line, you can make a shell alias. If you use other stuff (scripts, binaries, whatever) that look for ssh on the path, you could drop a wrapper script somewhere that has a higher priority than the real binary.
– pt314
yesterday
add a comment |Â
up vote
4
down vote
accepted
-F configfile
Specifies an alternative per-user configuration file. If a configuration file is given on the command line, the system-wide configuration file (/etc/ssh/ssh_config) will be ignored. The default for the per-user configuration file is ~/.ssh/config.
Source: https://linux.die.net/man/1/ssh
This works but every time I need to enter the config file path. Is it possible to store this option as default somewhere?
– motam79
yesterday
@motam79 quoting: "[...] the system-wide configuration file (/etc/ssh/ssh_config) will be ignored.". Without system-wide file, you can't store this anywhere. (This is my own assumption without any hard evidence and testing!)
– Ismael Miguel
yesterday
@motam79 If you're only starting ssh manually from the command line, you can make a shell alias. If you use other stuff (scripts, binaries, whatever) that look for ssh on the path, you could drop a wrapper script somewhere that has a higher priority than the real binary.
– pt314
yesterday
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
-F configfile
Specifies an alternative per-user configuration file. If a configuration file is given on the command line, the system-wide configuration file (/etc/ssh/ssh_config) will be ignored. The default for the per-user configuration file is ~/.ssh/config.
Source: https://linux.die.net/man/1/ssh
-F configfile
Specifies an alternative per-user configuration file. If a configuration file is given on the command line, the system-wide configuration file (/etc/ssh/ssh_config) will be ignored. The default for the per-user configuration file is ~/.ssh/config.
Source: https://linux.die.net/man/1/ssh
answered yesterday
Steven
23k1074109
23k1074109
This works but every time I need to enter the config file path. Is it possible to store this option as default somewhere?
– motam79
yesterday
@motam79 quoting: "[...] the system-wide configuration file (/etc/ssh/ssh_config) will be ignored.". Without system-wide file, you can't store this anywhere. (This is my own assumption without any hard evidence and testing!)
– Ismael Miguel
yesterday
@motam79 If you're only starting ssh manually from the command line, you can make a shell alias. If you use other stuff (scripts, binaries, whatever) that look for ssh on the path, you could drop a wrapper script somewhere that has a higher priority than the real binary.
– pt314
yesterday
add a comment |Â
This works but every time I need to enter the config file path. Is it possible to store this option as default somewhere?
– motam79
yesterday
@motam79 quoting: "[...] the system-wide configuration file (/etc/ssh/ssh_config) will be ignored.". Without system-wide file, you can't store this anywhere. (This is my own assumption without any hard evidence and testing!)
– Ismael Miguel
yesterday
@motam79 If you're only starting ssh manually from the command line, you can make a shell alias. If you use other stuff (scripts, binaries, whatever) that look for ssh on the path, you could drop a wrapper script somewhere that has a higher priority than the real binary.
– pt314
yesterday
This works but every time I need to enter the config file path. Is it possible to store this option as default somewhere?
– motam79
yesterday
This works but every time I need to enter the config file path. Is it possible to store this option as default somewhere?
– motam79
yesterday
@motam79 quoting: "[...] the system-wide configuration file (/etc/ssh/ssh_config) will be ignored.". Without system-wide file, you can't store this anywhere. (This is my own assumption without any hard evidence and testing!)
– Ismael Miguel
yesterday
@motam79 quoting: "[...] the system-wide configuration file (/etc/ssh/ssh_config) will be ignored.". Without system-wide file, you can't store this anywhere. (This is my own assumption without any hard evidence and testing!)
– Ismael Miguel
yesterday
@motam79 If you're only starting ssh manually from the command line, you can make a shell alias. If you use other stuff (scripts, binaries, whatever) that look for ssh on the path, you could drop a wrapper script somewhere that has a higher priority than the real binary.
– pt314
yesterday
@motam79 If you're only starting ssh manually from the command line, you can make a shell alias. If you use other stuff (scripts, binaries, whatever) that look for ssh on the path, you could drop a wrapper script somewhere that has a higher priority than the real binary.
– pt314
yesterday
add a comment |Â
up vote
3
down vote
As of OpenSSH 7.3p1, you can Include other config files in ssh_config.
So, you could add to /etc/ssh/ssh_config:
Include ~/custom_ssh.conf
Don't think this will stop the default ~/.ssh/config from being loaded, however.
New contributor
C. Furlani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
3
down vote
As of OpenSSH 7.3p1, you can Include other config files in ssh_config.
So, you could add to /etc/ssh/ssh_config:
Include ~/custom_ssh.conf
Don't think this will stop the default ~/.ssh/config from being loaded, however.
New contributor
C. Furlani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
3
down vote
up vote
3
down vote
As of OpenSSH 7.3p1, you can Include other config files in ssh_config.
So, you could add to /etc/ssh/ssh_config:
Include ~/custom_ssh.conf
Don't think this will stop the default ~/.ssh/config from being loaded, however.
New contributor
C. Furlani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
As of OpenSSH 7.3p1, you can Include other config files in ssh_config.
So, you could add to /etc/ssh/ssh_config:
Include ~/custom_ssh.conf
Don't think this will stop the default ~/.ssh/config from being loaded, however.
New contributor
C. Furlani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
C. Furlani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered yesterday
C. Furlani
311
311
New contributor
C. Furlani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
C. Furlani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
C. Furlani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1357394%2fnon-default-location-for-ssh-config-file-in-linux%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password