TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

SSH shortcuts through Bash aliases on Ubuntu

1 pointsby codepunkerover 10 years ago

1 comment

mooism2over 10 years ago
1. Add an entry to ~&#x2F;.ssh&#x2F;config instead of adding a bash alias: it works with scp&#x2F;sftp as well as ssh.<p>e.g.<p><pre><code> Host dev Port 22222 IdentityFile ~&#x2F;.ssh&#x2F;icantreadwhatyourprivatekeyfilescalled User dev HostName dev.web3box.com </code></pre> --- then ssh dev logs you into your dev box.<p>Read man ssh_config.<p>2. Why in the world are you running sudo? Even if you are logging in as root on the remote server, sudo only has an affect on the local machine.
评论 #8221362 未加载