David Sankovsky
asked on
Debian OS use Alias with parameter
Hi all.
I'm trying to make a bash alias with a parameter on my Debian (I'm very new to linux, so be gentle)
I'm trying to override the basic ssh <host> command with the following ssh -i <path to my dsa file> <host>.
I know I can basically edit the ssh_conf file t make it include my file anyways, but I'd still like to know wow to create the command as an alias in the bashrc file.
I'm trying to make a bash alias with a parameter on my Debian (I'm very new to linux, so be gentle)
I'm trying to override the basic ssh <host> command with the following ssh -i <path to my dsa file> <host>.
I know I can basically edit the ssh_conf file t make it include my file anyways, but I'd still like to know wow to create the command as an alias in the bashrc file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
alias ssh='ssh -i /path/to/dsa/ host'I may have explained wrong, I meant for the hot to be passed along as an argument.
But that will make it so everytime you type ssh it will connect to the same host. A better option would be to make a unique alias like so:
alias myss='ssh -i /path/to/dsa/ host'
Why not;
alias ssh='ssh -i /path/to/dsa '
Well, now I just feel dumb for not thinking about it...
ASKER
kinda obvious when i think about it...
alias ssh='ssh -i /path/to/dsa/ host'
But that will make it so everytime you type ssh it will connect to the same host. A better option would be to make a unique alias like so:
alias myss='ssh -i /path/to/dsa/ host'